From 887611cb946fb509447728a2f8de9aaeb63c8826 Mon Sep 17 00:00:00 2001 From: Lars Klassen Date: Thu, 20 Feb 2025 19:42:06 -0300 Subject: [PATCH 1/2] Fix: Root Controller for start capture view --- index.d.ts | 4 ++-- ios/RNFaceApi.m | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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] From 8b4bef675e209106f95bdf461b4186fa36f175c8 Mon Sep 17 00:00:00 2001 From: Lars Klassen Date: Wed, 26 Feb 2025 13:50:25 -0300 Subject: [PATCH 2/2] Version number change --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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": {