diff --git a/index.d.ts b/index.d.ts index 965d283..628f59a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1509,7 +1509,7 @@ export default class FaceSDK { static setLocalizationDictionary(dictionary: Record, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void static setRequestHeaders(headers: Record, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void static setCustomization(config: Customization, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void - static isInitialized(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void + static isInitialized(successCallback: (response: boolean) => void, errorCallback?: (error: string) => void): void static initialize(config: InitConfig | null, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void static deinitialize(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void static startFaceCapture(config: FaceCaptureConfig | null, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void @@ -1540,4 +1540,4 @@ export default class FaceSDK { static getPersonsInGroup(groupId: string, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void static getPersonsInGroupForPage(groupId: string, page: number, size: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void static searchPerson(searchPersonRequest: SearchPersonRequest, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void -} \ No newline at end of file +} diff --git a/ios/RNFaceApi.m b/ios/RNFaceApi.m index cb32ff7..a9fb6f4 100644 --- a/ios/RNFaceApi.m +++ b/ios/RNFaceApi.m @@ -136,7 +136,8 @@ - (void) deinitialize { - (void) startFaceCapture:(NSDictionary*)config :(RFSWCallback)callback { dispatch_async(dispatch_get_main_queue(), ^{ - [RFSFaceSDK.service presentFaceCaptureViewControllerFrom:[UIApplication sharedApplication].windows.lastObject.rootViewController + UIViewController *currentViewController = [[[UIApplication sharedApplication] keyWindow] rootViewController]; + [RFSFaceSDK.service presentFaceCaptureViewControllerFrom:currentViewController animated:true configuration:[RFSWConfig faceCaptureConfigFromJSON:config] onCapture:[self faceCaptureCompletion:callback] @@ -150,7 +151,8 @@ - (void) stopFaceCapture { - (void) startLiveness:(NSDictionary*)config :(RFSWCallback)callback { dispatch_async(dispatch_get_main_queue(), ^{ - [RFSFaceSDK.service startLivenessFrom:[UIApplication sharedApplication].windows.lastObject.rootViewController + UIViewController *currentViewController = [[[UIApplication sharedApplication] keyWindow] rootViewController]; + [RFSFaceSDK.service startLivenessFrom:currentViewController animated:true configuration:[RFSWConfig livenessConfigFromJSON:config] onLiveness:[self livenessCompletion:callback] diff --git a/package.json b/package.json index f93f6df..66abb27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@regulaforensics/react-native-face-api", - "version": "6.4.471", + "version": "6.4.472", "description": "React Native module for compairing faces using phone`s camera", "main": "index.js", "scripts": {