@soyio/soyio-rn-sdk 4.1.0 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/android/libs/{facetec-sdk-9.7.96.aar → facetec-sdk-9.7.114.aar} +0 -0
- package/ios/Frameworks/FaceTecSDK.framework/FaceTecSDK +0 -0
- package/ios/Frameworks/FaceTecSDK.framework/Info.plist +0 -0
- package/ios/IOSFacetecSdk.swift +33 -31
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -52,6 +52,6 @@ dependencies {
|
|
|
52
52
|
def kotlinVersion = safeExtGet('kotlinVersion', '1.8.0')
|
|
53
53
|
implementation "com.facebook.react:react-native:+"
|
|
54
54
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
|
|
55
|
-
implementation(name: "facetec-sdk-9.7.
|
|
55
|
+
implementation(name: "facetec-sdk-9.7.114", ext: "aar")
|
|
56
56
|
implementation "com.squareup.okhttp3:okhttp:3.12.13"
|
|
57
57
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/ios/IOSFacetecSdk.swift
CHANGED
|
@@ -86,39 +86,41 @@ class IOSFacetecSdk: RCTEventEmitter {
|
|
|
86
86
|
return
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
DispatchQueue.main.async {
|
|
90
|
+
let status = FaceTec.sdk.getStatus()
|
|
91
|
+
if status == .initialized {
|
|
92
|
+
resolver(["success": true])
|
|
93
|
+
return
|
|
94
|
+
}
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
FacetecConfig.apply(theme: themeColors)
|
|
105
|
-
|
|
106
|
-
// Initialize SDK directly (matching Android pattern)
|
|
107
|
-
FaceTec.sdk.initializeInProductionMode(
|
|
108
|
-
productionKeyText: productionKey,
|
|
109
|
-
deviceKeyIdentifier: deviceKey,
|
|
110
|
-
faceScanEncryptionKey: publicKey,
|
|
111
|
-
completion: { initializationSuccessful in
|
|
112
|
-
if initializationSuccessful {
|
|
113
|
-
resolver(["success": true])
|
|
114
|
-
} else {
|
|
115
|
-
let sdkStatus = FaceTec.sdk.getStatus()
|
|
116
|
-
print("[FaceTec] Initialization failed with status: \(sdkStatus.rawValue) (\(sdkStatus))")
|
|
117
|
-
let errorMessage = self.getStatusErrorMessage(sdkStatus)
|
|
118
|
-
resolver(["success": false, "error": errorMessage])
|
|
119
|
-
}
|
|
96
|
+
// Apply customization before initializing (matching Android pattern)
|
|
97
|
+
var themeColors: [String: String]? = nil
|
|
98
|
+
if let theme = config["theme"] as? [String: Any] {
|
|
99
|
+
themeColors = [
|
|
100
|
+
"mainColor": theme["mainColor"] as? String ?? "",
|
|
101
|
+
"highlightColor": theme["highlightColor"] as? String ?? "",
|
|
102
|
+
"disabledColor": theme["disabledColor"] as? String ?? ""
|
|
103
|
+
]
|
|
120
104
|
}
|
|
121
|
-
|
|
105
|
+
FacetecConfig.apply(theme: themeColors)
|
|
106
|
+
|
|
107
|
+
// Initialize SDK directly (matching Android pattern)
|
|
108
|
+
FaceTec.sdk.initializeInProductionMode(
|
|
109
|
+
productionKeyText: productionKey,
|
|
110
|
+
deviceKeyIdentifier: deviceKey,
|
|
111
|
+
faceScanEncryptionKey: publicKey,
|
|
112
|
+
completion: { initializationSuccessful in
|
|
113
|
+
if initializationSuccessful {
|
|
114
|
+
resolver(["success": true])
|
|
115
|
+
} else {
|
|
116
|
+
let sdkStatus = FaceTec.sdk.getStatus()
|
|
117
|
+
print("[FaceTec] Initialization failed with status: \(sdkStatus.rawValue) (\(sdkStatus))")
|
|
118
|
+
let errorMessage = self.getStatusErrorMessage(sdkStatus)
|
|
119
|
+
resolver(["success": false, "error": errorMessage])
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
}
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
private func startLivenessAndIDVerificationFlow(facetecSessionToken: String,
|