From dc77a4ba5e06fa50608fee9b762cdcdf733ba5d5 Mon Sep 17 00:00:00 2001 From: JNdhlovu Date: Mon, 2 Sep 2024 10:22:31 +0200 Subject: [PATCH] fix: ios config setup fixes (#64) --- CHANGELOG.md | 2 ++ example/ios/Podfile.lock | 4 ++-- ios/RNSmileID.mm | 4 ++-- ios/RNSmileID.swift | 12 ++++++------ package.json | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2af067..5a9d083 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Release Notes +## 10.1.11 +* Fix config issues on iOS ## 10.1.10 * Bump ios to 10.2.8 (https://github.com/smileidentity/ios/releases/tag/v10.2.8) In memory zip file handling diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index b759588..215ef30 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -938,7 +938,7 @@ PODS: - React-debug - react-native-safe-area-context (4.10.5): - React-Core - - react-native-smile-id (10.1.10): + - react-native-smile-id (10.1.11): - DoubleConversion - glog - hermes-engine @@ -1436,7 +1436,7 @@ SPEC CHECKSUMS: React-logger: 29fa3e048f5f67fe396bc08af7606426d9bd7b5d React-Mapbuffer: bf56147c9775491e53122a94c423ac201417e326 react-native-safe-area-context: a240ad4b683349e48b1d51fed1611138d1bdad97 - react-native-smile-id: f6bee073187d513db2a701a83c1996d572c9277f + react-native-smile-id: f75eaf18d9f18fd71d24d4f19a83e29c505a14d7 React-nativeconfig: 9f223cd321823afdecf59ed00861ab2d69ee0fc1 React-NativeModulesApple: ff7efaff7098639db5631236cfd91d60abff04c0 React-perflogger: 32ed45d9cee02cf6639acae34251590dccd30994 diff --git a/ios/RNSmileID.mm b/ios/RNSmileID.mm index 73e9e6c..d9f573e 100644 --- a/ios/RNSmileID.mm +++ b/ios/RNSmileID.mm @@ -1,8 +1,8 @@ #import @interface RCT_EXTERN_MODULE(RNSmileID, NSObject) -RCT_EXTERN_METHOD(initializeWithApiKey:(NSString)apiKey, (NSDictionary *)config, (BOOL)useSandBox, (BOOL)enableCrashReporting withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject) -RCT_EXTERN_METHOD(initializeWithConfig:(NSDictionary *)config, (BOOL)useSandBox, (BOOL)enableCrashReporting withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject) +RCT_EXTERN_METHOD(initializeWithApiKey:(NSString *)apiKey config:(NSDictionary *)config useSandBox:(BOOL)useSandBox enableCrashReporting:(BOOL)enableCrashReporting withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject) +RCT_EXTERN_METHOD(initializeWithConfig:(NSDictionary *)config useSandBox:(BOOL)useSandBox enableCrashReporting:(BOOL)enableCrashReporting withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject) RCT_EXTERN_METHOD(initialize:(BOOL)useSandBox withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject) RCT_EXTERN_METHOD(setCallbackUrl:(NSString)callbackUrl withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject) RCT_EXTERN_METHOD(setAllowOfflineMode:(BOOL)allowOfflineMode withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject) diff --git a/ios/RNSmileID.swift b/ios/RNSmileID.swift index 4b9ca66..85bc056 100644 --- a/ios/RNSmileID.swift +++ b/ios/RNSmileID.swift @@ -2,14 +2,14 @@ import SmileID @objc(RNSmileID) class RNSmileID: NSObject { - @objc(initializeWithApiKey:withResolver:withRejecter:) + @objc(initializeWithApiKey:config:useSandBox:enableCrashReporting:withResolver:withRejecter:) func initializeWithApiKey( apiKey: String, config: NSDictionary, - useSandBox: Bool, + useSandBox: Bool, enableCrashReporting: Bool, resolve: @escaping RCTPromiseResolveBlock, - reject _: @escaping RCTPromiseRejectBlock + reject: @escaping RCTPromiseRejectBlock ) { SmileID.initialize( apiKey: apiKey, @@ -18,14 +18,14 @@ class RNSmileID: NSObject { ) resolve(nil) } - - @objc(initializeWithConfig:withResolver:withRejecter:) + + @objc(initializeWithConfig:useSandBox:enableCrashReporting:withResolver:withRejecter:) func initializeWithConfig( config: NSDictionary, useSandBox: Bool, enableCrashReporting: Bool, resolve: @escaping RCTPromiseResolveBlock, - reject _: @escaping RCTPromiseRejectBlock + reject: @escaping RCTPromiseRejectBlock ) { SmileID.initialize( config: config.toConfig(), diff --git a/package.json b/package.json index c723455..dd7ead2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@smile_identity/react-native", - "version": "10.1.10", + "version": "10.1.11", "description": "Official wrapper for the Smile ID