Skip to content

Commit

Permalink
fix: ios config setup fixes (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
JNdhlovu authored Sep 2, 2024
1 parent 7866bae commit dc77a4b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ios/RNSmileID.mm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#import <React/RCTBridgeModule.h>

@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)
Expand Down
12 changes: 6 additions & 6 deletions ios/RNSmileID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@smile_identity/react-native",
"version": "10.1.10",
"version": "10.1.11",
"description": "Official wrapper for the Smile ID <v10 android and iOS SDKs",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down

0 comments on commit dc77a4b

Please sign in to comment.