@regulaforensics/face-sdk 8.3.1398-rc → 8.3.1407-rc
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/Package.swift +27 -0
- package/README.md +3 -0
- package/android/CDVFaceSDK.kt +4 -3
- package/android/build.gradle.kts +37 -0
- package/android/cordova.gradle.kts +17 -0
- package/android/src/main/kotlin/com/regula/plugin/{facesdk → face/sdk}/Config.kt +1 -3
- package/android/src/main/kotlin/com/regula/plugin/{facesdk → face/sdk}/Implementation.kt +2 -2
- package/android/src/main/kotlin/com/regula/plugin/{facesdk → face/sdk}/JSONConstructor.kt +4 -4
- package/android/src/main/kotlin/com/regula/plugin/{facesdk → face/sdk}/RNFaceApiModule.kt +1 -1
- package/android/src/main/kotlin/com/regula/plugin/{facesdk → face/sdk}/Utils.kt +2 -2
- package/app.plugin.js +10 -7
- package/examples/capacitor/README.md +2 -0
- package/examples/capacitor/android/app/build.gradle +1 -10
- package/examples/capacitor/android/app/src/main/AndroidManifest.xml +9 -0
- package/examples/capacitor/android/app/src/main/res/xml/file_paths.xml +5 -0
- package/examples/capacitor/android/build.gradle +12 -3
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/examples/capacitor/android/gradle.properties +4 -0
- package/examples/capacitor/android/gradlew +4 -7
- package/examples/capacitor/android/gradlew.bat +82 -94
- package/examples/capacitor/android/variables.gradle +13 -9
- package/examples/capacitor/capacitor.config.json +15 -0
- package/examples/capacitor/index.tsx +15 -23
- package/examples/capacitor/ios/App/App/AppDelegate.swift +5 -40
- package/examples/capacitor/ios/App/App/Info.plist +18 -2
- package/examples/capacitor/ios/App/App/SceneDelegate.swift +23 -0
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +25 -85
- package/examples/capacitor/ios/App/CapApp-SPM/Sources/CapApp-SPM/CapApp-SPM.swift +1 -0
- package/examples/capacitor/package-lock.json +1075 -1935
- package/examples/capacitor/package.json +14 -19
- package/examples/capacitor/scripts/android.sh +5 -8
- package/examples/capacitor/scripts/ios.sh +5 -7
- package/examples/capacitor/scripts/setup.sh +2 -6
- package/examples/capacitor/src/main.css +5 -1
- package/examples/capacitor/vite.config.ts +0 -12
- package/examples/ionic/README.md +2 -0
- package/examples/ionic/config.xml +1 -1
- package/examples/ionic/index.tsx +8 -3
- package/examples/ionic/package-lock.json +6445 -12138
- package/examples/ionic/package.json +23 -27
- package/examples/ionic/scripts/android.sh +0 -2
- package/examples/ionic/scripts/ios.sh +0 -2
- package/examples/ionic/scripts/setup.sh +0 -2
- package/examples/ionic/tsconfig.json +0 -1
- package/examples/react_native/README.md +2 -0
- package/examples/react_native/app.config.ts +0 -1
- package/examples/react_native/package-lock.json +2108 -3737
- package/examples/react_native/package.json +19 -17
- package/examples/react_native/scripts/android.sh +8 -6
- package/examples/react_native/scripts/ios.sh +7 -5
- package/examples/react_native/scripts/setup.sh +7 -4
- package/ios/CDVFaceSDK.swift +6 -1
- package/ios/Config.swift +1 -3
- package/ios/Decoder.swift +1 -1
- package/ios/Implementation.swift +4 -4
- package/ios/RNFaceSDK.swift +2 -2
- package/package.json +1 -1
- package/plugin.xml +11 -11
- package/react-native-face-sdk.podspec +14 -0
- package/test/json.tsx +0 -20
- package/test/package-lock.json +1 -1
- package/test/test.tsx +0 -2
- package/www/capacitor/internal/cordova.js +2 -2
- package/www/capacitor/liveness/verification_config.js +2 -18
- package/www/cordova.js +4 -20
- package/www/react-native/liveness/verification_config.js +2 -18
- package/www/types/liveness/verification_config.d.ts +2 -27
- package/RNFaceSDK.podspec +0 -21
- package/android/build.gradle +0 -36
- package/android/cordova.gradle +0 -18
- package/examples/capacitor/android/app/capacitor.build.gradle +0 -21
- package/examples/capacitor/android/capacitor.settings.gradle +0 -12
- package/examples/capacitor/ionic.config.json +0 -7
- package/examples/capacitor/ios/App/App/Base.lproj/Main.storyboard +0 -19
- package/examples/capacitor/ios/App/App.xcworkspace/contents.xcworkspacedata +0 -10
- package/examples/capacitor/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/examples/capacitor/ios/App/Podfile +0 -31
- package/examples/capacitor/ios/App/Podfile.lock +0 -57
- package/examples/react_native/vendor/image-size-metro-compat/index.cjs +0 -16
- package/examples/react_native/vendor/image-size-metro-compat/package.json +0 -8
|
@@ -5,29 +5,31 @@
|
|
|
5
5
|
"setup": "scripts/setup.sh",
|
|
6
6
|
"ios": "scripts/ios.sh",
|
|
7
7
|
"android": "scripts/android.sh",
|
|
8
|
-
"start": "expo start"
|
|
8
|
+
"start": "expo start --port \"$npm_package_config_metroPort\""
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@regulaforensics/face-sdk": "8.3.
|
|
12
|
-
"@regulaforensics/face-core-basic": "8.4.
|
|
13
|
-
"react-native": "
|
|
11
|
+
"@regulaforensics/face-sdk": "8.3.1407-rc",
|
|
12
|
+
"@regulaforensics/face-core-basic": "8.4.855-rc",
|
|
13
|
+
"react-native": "0.88.0-rc.0",
|
|
14
14
|
"react-native-fs": "^2.20.0",
|
|
15
15
|
"react-native-image-picker": "^8.2.1",
|
|
16
|
-
"react-native-webview": "^
|
|
17
|
-
"
|
|
18
|
-
"react": "
|
|
19
|
-
"
|
|
20
|
-
"expo": "
|
|
21
|
-
"expo-dev-client": "^6.0.12",
|
|
16
|
+
"react-native-webview": "^14.0.1",
|
|
17
|
+
"react": "19.2.3",
|
|
18
|
+
"@types/react": "19.2.18",
|
|
19
|
+
"expo": "58.0.0-preview.3",
|
|
20
|
+
"expo-dev-client": "58.0.3",
|
|
22
21
|
"expo-custom-assets": "^1.5.0",
|
|
23
|
-
"expo-build-properties": "
|
|
24
|
-
"typescript": "
|
|
25
|
-
"
|
|
22
|
+
"expo-build-properties": "58.0.3",
|
|
23
|
+
"typescript": "^7.0.2",
|
|
24
|
+
"@expo/config-plugins": "58.0.0"
|
|
26
25
|
},
|
|
27
26
|
"overrides": {
|
|
28
|
-
"postcss": "^8.5.10",
|
|
29
27
|
"uuid": "^14.0.0",
|
|
30
|
-
"
|
|
31
|
-
|
|
28
|
+
"expo-custom-assets": {
|
|
29
|
+
"expo": "$expo"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"config": {
|
|
33
|
+
"metroPort": 8082
|
|
32
34
|
}
|
|
33
|
-
}
|
|
35
|
+
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -e
|
|
3
3
|
|
|
4
|
-
adb reverse tcp
|
|
4
|
+
adb reverse tcp:${npm_package_config_metroPort} tcp:${npm_package_config_metroPort} >/dev/null || :
|
|
5
5
|
if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
|
|
6
6
|
open -a 'Android Studio' android
|
|
7
|
-
#
|
|
8
|
-
[[
|
|
7
|
+
# Check if Metro is running at app's port.
|
|
8
|
+
if [[ "$(curl --silent --max-time 2 http://localhost:${npm_package_config_metroPort}/status)" != "packager-status:running" ]]; then
|
|
9
|
+
npm start
|
|
10
|
+
else
|
|
11
|
+
echo "Metro is already running on port ${npm_package_config_metroPort}."
|
|
12
|
+
fi
|
|
9
13
|
else
|
|
10
|
-
expo run:android --device
|
|
14
|
+
expo run:android --device --port ${npm_package_config_metroPort}
|
|
11
15
|
fi
|
|
12
|
-
|
|
13
|
-
exit 0
|
|
@@ -3,10 +3,12 @@ set -e
|
|
|
3
3
|
|
|
4
4
|
if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
|
|
5
5
|
open ios/Face.xcworkspace
|
|
6
|
-
#
|
|
7
|
-
[[
|
|
6
|
+
# Check if Metro is running at app's port.
|
|
7
|
+
if [[ "$(curl --silent --max-time 2 http://localhost:${npm_package_config_metroPort}/status)" != "packager-status:running" ]]; then
|
|
8
|
+
npm start
|
|
9
|
+
else
|
|
10
|
+
echo "Metro is already running on port ${npm_package_config_metroPort}."
|
|
11
|
+
fi
|
|
8
12
|
else
|
|
9
|
-
npx expo run:ios
|
|
13
|
+
npx expo run:ios --device --port ${npm_package_config_metroPort}
|
|
10
14
|
fi
|
|
11
|
-
|
|
12
|
-
exit 0
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -e
|
|
3
3
|
|
|
4
|
+
# Kill Metro instance at app's port.
|
|
5
|
+
lsof -tiTCP:${npm_package_config_metroPort} -sTCP:LISTEN | xargs kill 2>/dev/null || true
|
|
6
|
+
|
|
4
7
|
npm install
|
|
5
|
-
expo
|
|
8
|
+
rm -rf node_modules/expo/node_modules/expo-modules-core/android/.cxx # Temp fix for expo@58.0.0-preview.3
|
|
9
|
+
npx expo prebuild --no-install
|
|
10
|
+
(cd ios && (pod install || pod update))
|
|
6
11
|
|
|
7
|
-
#
|
|
12
|
+
# Add aaptOptions for offline match
|
|
8
13
|
if ! grep -q faceSdkResource android/app/build.gradle && grep -q face-core-match package.json; then
|
|
9
14
|
sed -i '' "s/androidResources/aaptOptions {\n\t\tnoCompress 'Regula\/faceSdkResource.dat'\n\t}\n\tandroidResources/" android/app/build.gradle
|
|
10
15
|
fi
|
|
11
|
-
|
|
12
|
-
exit 0
|
package/ios/CDVFaceSDK.swift
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
#if canImport(Cordova)
|
|
2
|
+
import Cordova
|
|
3
|
+
#endif
|
|
4
|
+
import UIKit
|
|
5
|
+
|
|
1
6
|
@objc(CDVFaceSDK)
|
|
2
7
|
class CDVFaceSDK: CDVPlugin {
|
|
3
8
|
@objc(exec:)
|
|
@@ -33,7 +38,7 @@ func sendEvent(_ event: String, _ data: Any? = "") {
|
|
|
33
38
|
this!.commandDelegate.send(result!, callbackId: callbackId)
|
|
34
39
|
}
|
|
35
40
|
|
|
36
|
-
func
|
|
41
|
+
func withPresenter(_ action: @escaping (UIViewController) -> Void) {
|
|
37
42
|
DispatchQueue.main.async {
|
|
38
43
|
let windows = UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }.filter { $0.activationState == .foregroundActive || $0.activationState == .foregroundInactive }.flatMap { $0.windows }
|
|
39
44
|
let candidates = windows.filter { $0.isKeyWindow } + windows.filter { !$0.isKeyWindow && !$0.isHidden && $0.alpha > 0 && $0.windowLevel == .normal }
|
package/ios/Config.swift
CHANGED
|
@@ -152,7 +152,7 @@ public extension LivenessConfiguration {
|
|
|
152
152
|
"skipStep": self.stepSkippingMask.encode(),
|
|
153
153
|
"metadata": self.metadata,
|
|
154
154
|
"person": self.person.encode(),
|
|
155
|
-
"searchFilter": self.searchFilter
|
|
155
|
+
"searchFilter": self.searchFilter?.encode(),
|
|
156
156
|
]
|
|
157
157
|
}
|
|
158
158
|
}
|
|
@@ -178,7 +178,6 @@ public extension LivenessConfiguration {
|
|
|
178
178
|
case("skipStep"): builder.stepSkippingMask = RFSLivenessStepSkip.decode(v)
|
|
179
179
|
case("metadata"): builder.metadata = v as! [String: Any]
|
|
180
180
|
case("personId"): builder.personId = v as! String
|
|
181
|
-
case("externalId"): builder.externalId = v as? String
|
|
182
181
|
case("threshold"): builder.threshold = v as? NSNumber
|
|
183
182
|
default: break
|
|
184
183
|
}
|
|
@@ -203,7 +202,6 @@ public extension LivenessConfiguration {
|
|
|
203
202
|
"skipStep": self.stepSkippingMask.encode(),
|
|
204
203
|
"metadata": self.metadata,
|
|
205
204
|
"personId": self.personId,
|
|
206
|
-
"externalId": self.externalId,
|
|
207
205
|
"threshold": self.threshold,
|
|
208
206
|
]
|
|
209
207
|
}
|
package/ios/Decoder.swift
CHANGED
|
@@ -1002,7 +1002,7 @@ public extension SearchPersonFilter {
|
|
|
1002
1002
|
let it = it as! [String: Any]
|
|
1003
1003
|
let result = Self()
|
|
1004
1004
|
result.groups = it["groups"] as! [String]
|
|
1005
|
-
result.threshold = CGFloat(it["threshold"] as!
|
|
1005
|
+
result.threshold = CGFloat(truncating: it["threshold"] as! NSNumber)
|
|
1006
1006
|
result.limit = it["limit"] as! Int
|
|
1007
1007
|
result.setValue(it["fieldName"] as Any?, forKey: "fieldName")
|
|
1008
1008
|
result.setValue(it["fieldValues"] as Any?, forKey: "fieldValues")
|
package/ios/Implementation.swift
CHANGED
|
@@ -39,7 +39,7 @@ func methodCall(_ method: String, _ callback: @escaping Callback) {
|
|
|
39
39
|
})
|
|
40
40
|
case("deinitialize"): face.deinitialize()
|
|
41
41
|
case("startFaceCapture"): let config = FaceCaptureConfiguration.decode(argsNullable(0))
|
|
42
|
-
|
|
42
|
+
withPresenter { presenter in
|
|
43
43
|
face.presentFaceCaptureViewController(
|
|
44
44
|
from: presenter,
|
|
45
45
|
animated: true,
|
|
@@ -48,7 +48,7 @@ func methodCall(_ method: String, _ callback: @escaping Callback) {
|
|
|
48
48
|
}
|
|
49
49
|
case("stopFaceCapture"): face.stopFaceCaptureViewController()
|
|
50
50
|
case("startLiveness"): let config = LivenessConfiguration.decode(argsNullable(0))
|
|
51
|
-
|
|
51
|
+
withPresenter { presenter in
|
|
52
52
|
face.startLiveness(
|
|
53
53
|
from: presenter,
|
|
54
54
|
animated: true,
|
|
@@ -56,7 +56,7 @@ func methodCall(_ method: String, _ callback: @escaping Callback) {
|
|
|
56
56
|
onLiveness: { callback($0.encode()) })
|
|
57
57
|
}
|
|
58
58
|
case("startEnrollment"): let config = EnrollmentConfiguration.decode2(args(0))
|
|
59
|
-
|
|
59
|
+
withPresenter { presenter in
|
|
60
60
|
face.startEnrollment(
|
|
61
61
|
from: presenter,
|
|
62
62
|
animated: true,
|
|
@@ -67,7 +67,7 @@ func methodCall(_ method: String, _ callback: @escaping Callback) {
|
|
|
67
67
|
]) })
|
|
68
68
|
}
|
|
69
69
|
case("startVerification"): let config = VerificationConfiguration.decode2(args(0))
|
|
70
|
-
|
|
70
|
+
withPresenter { presenter in
|
|
71
71
|
face.startVerification(
|
|
72
72
|
from: presenter,
|
|
73
73
|
animated: true,
|
package/ios/RNFaceSDK.swift
CHANGED
|
@@ -34,10 +34,10 @@ private var this: RNFaceSDK?
|
|
|
34
34
|
|
|
35
35
|
func sendEvent(_ event: String, _ data: Any? = nil) {
|
|
36
36
|
guard let plugin = this, hasListeners else { return }
|
|
37
|
-
|
|
37
|
+
DispatchQueue.main.async { plugin.sendEvent(withName: event, body: data.toSendable()) }
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
func
|
|
40
|
+
func withPresenter(_ action: @escaping (UIViewController) -> Void) {
|
|
41
41
|
DispatchQueue.main.async {
|
|
42
42
|
if let presenter = RCTPresentedViewController() {
|
|
43
43
|
action(presenter)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/face-sdk",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.1407-rc",
|
|
4
4
|
"description": "This is an npm module for Regula Face SDK. It allows you to easily compaire faces using your phone's camera.",
|
|
5
5
|
"main": "www/react-native/index.js",
|
|
6
6
|
"module": "www/capacitor/index.js",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@regulaforensics/face-sdk" version="8.3.
|
|
2
|
+
<plugin id="@regulaforensics/face-sdk" version="8.3.1407-rc" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>FaceSDK</name>
|
|
4
4
|
<description>Cordova plugin for Regula Face SDK</description>
|
|
5
5
|
<license>commercial</license>
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
<clobbers target="FaceSDKPlugin" />
|
|
10
10
|
</js-module>
|
|
11
11
|
|
|
12
|
-
<platform name="ios">
|
|
12
|
+
<platform name="ios" package="swift">
|
|
13
13
|
<config-file target="config.xml" parent="/widget">
|
|
14
14
|
<feature name="FaceSDK">
|
|
15
15
|
<param name="ios-package" value="CDVFaceSDK" />
|
|
16
16
|
</feature>
|
|
17
|
-
<preference name="deployment-target" value="
|
|
17
|
+
<preference name="deployment-target" value="15.0" />
|
|
18
18
|
<preference name="SwiftVersion" value="5" />
|
|
19
19
|
</config-file>
|
|
20
20
|
<source-file src="ios/CDVFaceSDK.swift" />
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<source url="https://github.com/regulaforensics/podspecs.git" />
|
|
28
28
|
</config>
|
|
29
29
|
<pods>
|
|
30
|
-
<pod name="FaceSDKStage" spec="8.4.
|
|
30
|
+
<pod name="FaceSDKStage" spec="8.4.4993" nospm="true" />
|
|
31
31
|
</pods>
|
|
32
32
|
</podspec>
|
|
33
33
|
</platform>
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
<platform name="android">
|
|
36
36
|
<config-file parent="/*" target="res/xml/config.xml">
|
|
37
37
|
<feature name="FaceSDK">
|
|
38
|
-
<param name="android-package" value="com.regula.plugin.
|
|
38
|
+
<param name="android-package" value="com.regula.plugin.face.sdk.CDVFaceSDK" />
|
|
39
39
|
</feature>
|
|
40
40
|
</config-file>
|
|
41
|
-
<framework src="android/cordova.gradle" custom="true" type="gradleReference" />
|
|
42
|
-
<source-file src="android/CDVFaceSDK.kt" target-dir="kotlin/com.regula.plugin.
|
|
43
|
-
<source-file src="android/src/main/kotlin/com/regula/plugin/
|
|
44
|
-
<source-file src="android/src/main/kotlin/com/regula/plugin/
|
|
45
|
-
<source-file src="android/src/main/kotlin/com/regula/plugin/
|
|
46
|
-
<source-file src="android/src/main/kotlin/com/regula/plugin/
|
|
41
|
+
<framework src="android/cordova.gradle.kts" custom="true" type="gradleReference" />
|
|
42
|
+
<source-file src="android/CDVFaceSDK.kt" target-dir="kotlin/com.regula.plugin.face.sdk" />
|
|
43
|
+
<source-file src="android/src/main/kotlin/com/regula/plugin/face/sdk/Implementation.kt" target-dir="kotlin/com.regula.plugin.face.sdk" />
|
|
44
|
+
<source-file src="android/src/main/kotlin/com/regula/plugin/face/sdk/JSONConstructor.kt" target-dir="kotlin/com.regula.plugin.face.sdk" />
|
|
45
|
+
<source-file src="android/src/main/kotlin/com/regula/plugin/face/sdk/Config.kt" target-dir="kotlin/com.regula.plugin.face.sdk" />
|
|
46
|
+
<source-file src="android/src/main/kotlin/com/regula/plugin/face/sdk/Utils.kt" target-dir="kotlin/com.regula.plugin.face.sdk" />
|
|
47
47
|
</platform>
|
|
48
48
|
</plugin>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Pod::Spec.new do |s|
|
|
2
|
+
s.name = 'react-native-face-sdk'
|
|
3
|
+
s.version = '8.3.1407-rc'
|
|
4
|
+
s.summary = 'Regula React Native plugin.'
|
|
5
|
+
s.license = 'commercial'
|
|
6
|
+
s.authors = { 'RegulaForensics' => 'support@regulaforensics.com' }
|
|
7
|
+
s.homepage = 'https://regulaforensics.com'
|
|
8
|
+
s.source = { :path => '.' }
|
|
9
|
+
s.ios.deployment_target = '15.0'
|
|
10
|
+
s.source_files = [ 'ios/*.swift', 'ios/RN*.m' ]
|
|
11
|
+
s.exclude_files = [ 'ios/CDVFaceSDK.swift' ]
|
|
12
|
+
s.dependency 'FaceSDKStage', '8.4.4993'
|
|
13
|
+
s.dependency 'React'
|
|
14
|
+
end
|
package/test/json.tsx
CHANGED
|
@@ -249,26 +249,6 @@ export var verificationConfig = {
|
|
|
249
249
|
"personId": "test0",
|
|
250
250
|
"threshold": 0.5,
|
|
251
251
|
};
|
|
252
|
-
export var verificationConfig2 = {
|
|
253
|
-
"copyright": true,
|
|
254
|
-
"cameraSwitchEnabled": false,
|
|
255
|
-
"closeButtonEnabled": true,
|
|
256
|
-
"torchButtonEnabled": false,
|
|
257
|
-
"vibrateOnSteps": true,
|
|
258
|
-
"cameraPositionAndroid": -1,
|
|
259
|
-
"cameraPositionIOS": 1,
|
|
260
|
-
"screenOrientation": [0, 1],
|
|
261
|
-
"locationTrackingEnabled": true,
|
|
262
|
-
"preventScreenRecording": false,
|
|
263
|
-
"attemptsCount": 2,
|
|
264
|
-
"recordingProcess": 0,
|
|
265
|
-
"livenessType": 1,
|
|
266
|
-
"tag": "test",
|
|
267
|
-
"skipStep": [0, 1],
|
|
268
|
-
"metadata": customJson,
|
|
269
|
-
"externalId": "test1",
|
|
270
|
-
"threshold": 0.5,
|
|
271
|
-
};
|
|
272
252
|
export var livenessBackendException = {
|
|
273
253
|
"code": 200,
|
|
274
254
|
"message": "No license",
|
package/test/package-lock.json
CHANGED
package/test/test.tsx
CHANGED
|
@@ -108,7 +108,6 @@ import {
|
|
|
108
108
|
size,
|
|
109
109
|
enrollmentConfig,
|
|
110
110
|
verificationConfig,
|
|
111
|
-
verificationConfig2,
|
|
112
111
|
enrollmentResponse,
|
|
113
112
|
verificationMatchResponse,
|
|
114
113
|
verificationResponse,
|
|
@@ -148,7 +147,6 @@ compare('faceCaptureResponse', faceCaptureResponse, FaceCaptureResponse.fromJson
|
|
|
148
147
|
compare('livenessConfig', livenessConfig, LivenessConfig.fromJson);
|
|
149
148
|
compare('enrollmentConfig', enrollmentConfig, EnrollmentConfig.fromJson);
|
|
150
149
|
compare('verificationConfig', verificationConfig, VerificationConfig.fromJson);
|
|
151
|
-
compare('verificationConfig2', verificationConfig2, VerificationConfig.fromJson);
|
|
152
150
|
compare('livenessBackendException', livenessBackendException, LivenessBackendException.fromJson);
|
|
153
151
|
compare('livenessException', livenessException, LivenessException.fromJson);
|
|
154
152
|
compare('livenessResponse', livenessResponse, LivenessResponse.fromJson);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var _exec = (completion,
|
|
1
|
+
var _exec = (completion, params, errorCallback = null) => cordova.exec(completion, errorCallback, "FaceSDK", "exec", params)
|
|
2
2
|
|
|
3
3
|
export const NativeModules = {
|
|
4
4
|
RNFaceSDK: {
|
|
5
|
-
exec: async (name,
|
|
5
|
+
exec: async (name, params) => new Promise((resolve, reject) => _exec(resolve, [name, ...params], error => reject(new Error(error))))
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -20,10 +20,10 @@ export class VerificationConfig {
|
|
|
20
20
|
skipStep
|
|
21
21
|
metadata
|
|
22
22
|
personId
|
|
23
|
-
externalId
|
|
24
23
|
threshold
|
|
25
24
|
|
|
26
|
-
constructor(options) {
|
|
25
|
+
constructor(personId, options) {
|
|
26
|
+
this.personId = personId
|
|
27
27
|
this.copyright = options?.copyright ?? true
|
|
28
28
|
this.cameraSwitchEnabled = options?.cameraSwitchEnabled ?? false
|
|
29
29
|
this.closeButtonEnabled = options?.closeButtonEnabled ?? true
|
|
@@ -40,23 +40,9 @@ export class VerificationConfig {
|
|
|
40
40
|
this.tag = options?.tag
|
|
41
41
|
this.skipStep = options?.skipStep ?? []
|
|
42
42
|
this.metadata = options?.metadata
|
|
43
|
-
this.personId = options?.personId
|
|
44
|
-
this.externalId = options?.externalId
|
|
45
43
|
this.threshold = options?.threshold
|
|
46
44
|
}
|
|
47
45
|
|
|
48
|
-
static withPersonId(personId, options) {
|
|
49
|
-
const result = new VerificationConfig(options)
|
|
50
|
-
result.personId = personId
|
|
51
|
-
return result
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
static withExternalId(externalId, options) {
|
|
55
|
-
const result = new VerificationConfig(options)
|
|
56
|
-
result.externalId = externalId
|
|
57
|
-
return result
|
|
58
|
-
}
|
|
59
|
-
|
|
60
46
|
static fromJson(jsonObject) {
|
|
61
47
|
if (jsonObject == null) return null
|
|
62
48
|
const result = new VerificationConfig()
|
|
@@ -78,7 +64,6 @@ export class VerificationConfig {
|
|
|
78
64
|
result.skipStep = jsonObject["skipStep"]
|
|
79
65
|
result.metadata = jsonObject["metadata"]
|
|
80
66
|
result.personId = jsonObject["personId"]
|
|
81
|
-
result.externalId = jsonObject["externalId"]
|
|
82
67
|
result.threshold = jsonObject["threshold"]
|
|
83
68
|
|
|
84
69
|
return result
|
|
@@ -103,7 +88,6 @@ export class VerificationConfig {
|
|
|
103
88
|
"skipStep": this.skipStep,
|
|
104
89
|
"metadata": this.metadata,
|
|
105
90
|
"personId": this.personId,
|
|
106
|
-
"externalId": this.externalId,
|
|
107
91
|
"threshold": this.threshold,
|
|
108
92
|
}
|
|
109
93
|
}
|
package/www/cordova.js
CHANGED
|
@@ -2985,11 +2985,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2985
2985
|
/* harmony export */ NativeEventEmitter: () => (/* binding */ NativeEventEmitter),
|
|
2986
2986
|
/* harmony export */ NativeModules: () => (/* binding */ NativeModules)
|
|
2987
2987
|
/* harmony export */ });
|
|
2988
|
-
var _exec = (completion,
|
|
2988
|
+
var _exec = (completion, params, errorCallback = null) => cordova.exec(completion, errorCallback, "FaceSDK", "exec", params)
|
|
2989
2989
|
|
|
2990
2990
|
const NativeModules = {
|
|
2991
2991
|
RNFaceSDK: {
|
|
2992
|
-
exec: async (name,
|
|
2992
|
+
exec: async (name, params) => new Promise((resolve, reject) => _exec(resolve, [name, ...params], error => reject(new Error(error))))
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
2995
2995
|
|
|
@@ -3566,10 +3566,10 @@ class VerificationConfig {
|
|
|
3566
3566
|
skipStep
|
|
3567
3567
|
metadata
|
|
3568
3568
|
personId
|
|
3569
|
-
externalId
|
|
3570
3569
|
threshold
|
|
3571
3570
|
|
|
3572
|
-
constructor(options) {
|
|
3571
|
+
constructor(personId, options) {
|
|
3572
|
+
this.personId = personId
|
|
3573
3573
|
this.copyright = options?.copyright ?? true
|
|
3574
3574
|
this.cameraSwitchEnabled = options?.cameraSwitchEnabled ?? false
|
|
3575
3575
|
this.closeButtonEnabled = options?.closeButtonEnabled ?? true
|
|
@@ -3586,23 +3586,9 @@ class VerificationConfig {
|
|
|
3586
3586
|
this.tag = options?.tag
|
|
3587
3587
|
this.skipStep = options?.skipStep ?? []
|
|
3588
3588
|
this.metadata = options?.metadata
|
|
3589
|
-
this.personId = options?.personId
|
|
3590
|
-
this.externalId = options?.externalId
|
|
3591
3589
|
this.threshold = options?.threshold
|
|
3592
3590
|
}
|
|
3593
3591
|
|
|
3594
|
-
static withPersonId(personId, options) {
|
|
3595
|
-
const result = new VerificationConfig(options)
|
|
3596
|
-
result.personId = personId
|
|
3597
|
-
return result
|
|
3598
|
-
}
|
|
3599
|
-
|
|
3600
|
-
static withExternalId(externalId, options) {
|
|
3601
|
-
const result = new VerificationConfig(options)
|
|
3602
|
-
result.externalId = externalId
|
|
3603
|
-
return result
|
|
3604
|
-
}
|
|
3605
|
-
|
|
3606
3592
|
static fromJson(jsonObject) {
|
|
3607
3593
|
if (jsonObject == null) return null
|
|
3608
3594
|
const result = new VerificationConfig()
|
|
@@ -3624,7 +3610,6 @@ class VerificationConfig {
|
|
|
3624
3610
|
result.skipStep = jsonObject["skipStep"]
|
|
3625
3611
|
result.metadata = jsonObject["metadata"]
|
|
3626
3612
|
result.personId = jsonObject["personId"]
|
|
3627
|
-
result.externalId = jsonObject["externalId"]
|
|
3628
3613
|
result.threshold = jsonObject["threshold"]
|
|
3629
3614
|
|
|
3630
3615
|
return result
|
|
@@ -3649,7 +3634,6 @@ class VerificationConfig {
|
|
|
3649
3634
|
"skipStep": this.skipStep,
|
|
3650
3635
|
"metadata": this.metadata,
|
|
3651
3636
|
"personId": this.personId,
|
|
3652
|
-
"externalId": this.externalId,
|
|
3653
3637
|
"threshold": this.threshold,
|
|
3654
3638
|
}
|
|
3655
3639
|
}
|
|
@@ -20,10 +20,10 @@ export class VerificationConfig {
|
|
|
20
20
|
skipStep
|
|
21
21
|
metadata
|
|
22
22
|
personId
|
|
23
|
-
externalId
|
|
24
23
|
threshold
|
|
25
24
|
|
|
26
|
-
constructor(options) {
|
|
25
|
+
constructor(personId, options) {
|
|
26
|
+
this.personId = personId
|
|
27
27
|
this.copyright = options?.copyright ?? true
|
|
28
28
|
this.cameraSwitchEnabled = options?.cameraSwitchEnabled ?? false
|
|
29
29
|
this.closeButtonEnabled = options?.closeButtonEnabled ?? true
|
|
@@ -40,23 +40,9 @@ export class VerificationConfig {
|
|
|
40
40
|
this.tag = options?.tag
|
|
41
41
|
this.skipStep = options?.skipStep ?? []
|
|
42
42
|
this.metadata = options?.metadata
|
|
43
|
-
this.personId = options?.personId
|
|
44
|
-
this.externalId = options?.externalId
|
|
45
43
|
this.threshold = options?.threshold
|
|
46
44
|
}
|
|
47
45
|
|
|
48
|
-
static withPersonId(personId, options) {
|
|
49
|
-
const result = new VerificationConfig(options)
|
|
50
|
-
result.personId = personId
|
|
51
|
-
return result
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
static withExternalId(externalId, options) {
|
|
55
|
-
const result = new VerificationConfig(options)
|
|
56
|
-
result.externalId = externalId
|
|
57
|
-
return result
|
|
58
|
-
}
|
|
59
|
-
|
|
60
46
|
static fromJson(jsonObject) {
|
|
61
47
|
if (jsonObject == null) return null
|
|
62
48
|
const result = new VerificationConfig()
|
|
@@ -78,7 +64,6 @@ export class VerificationConfig {
|
|
|
78
64
|
result.skipStep = jsonObject["skipStep"]
|
|
79
65
|
result.metadata = jsonObject["metadata"]
|
|
80
66
|
result.personId = jsonObject["personId"]
|
|
81
|
-
result.externalId = jsonObject["externalId"]
|
|
82
67
|
result.threshold = jsonObject["threshold"]
|
|
83
68
|
|
|
84
69
|
return result
|
|
@@ -103,7 +88,6 @@ export class VerificationConfig {
|
|
|
103
88
|
"skipStep": this.skipStep,
|
|
104
89
|
"metadata": this.metadata,
|
|
105
90
|
"personId": this.personId,
|
|
106
|
-
"externalId": this.externalId,
|
|
107
91
|
"threshold": this.threshold,
|
|
108
92
|
}
|
|
109
93
|
}
|
|
@@ -89,9 +89,7 @@ export class VerificationConfig {
|
|
|
89
89
|
|
|
90
90
|
threshold?: number
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
static withPersonId(
|
|
92
|
+
constructor(
|
|
95
93
|
personId: string,
|
|
96
94
|
options?: {
|
|
97
95
|
copyright?: boolean
|
|
@@ -112,28 +110,5 @@ export class VerificationConfig {
|
|
|
112
110
|
metadata?: Record<string, any>
|
|
113
111
|
threshold?: number
|
|
114
112
|
}
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
static withExternalId(
|
|
118
|
-
externalId: string,
|
|
119
|
-
options?: {
|
|
120
|
-
copyright?: boolean
|
|
121
|
-
cameraSwitchEnabled?: boolean
|
|
122
|
-
closeButtonEnabled?: boolean
|
|
123
|
-
torchButtonEnabled?: boolean
|
|
124
|
-
vibrateOnSteps?: boolean
|
|
125
|
-
cameraPositionAndroid?: number
|
|
126
|
-
cameraPositionIOS?: CameraPosition
|
|
127
|
-
screenOrientation?: Array<ScreenOrientation>
|
|
128
|
-
locationTrackingEnabled?: boolean
|
|
129
|
-
preventScreenRecording?: boolean
|
|
130
|
-
attemptsCount?: number
|
|
131
|
-
recordingProcess?: RecordingProcess
|
|
132
|
-
livenessType?: LivenessType
|
|
133
|
-
tag?: string
|
|
134
|
-
skipStep?: Array<LivenessSkipStep>
|
|
135
|
-
metadata?: Record<string, any>
|
|
136
|
-
threshold?: number
|
|
137
|
-
}
|
|
138
|
-
): VerificationConfig;
|
|
113
|
+
)
|
|
139
114
|
}
|
package/RNFaceSDK.podspec
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
require 'json'
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
-
source = File.join(__dir__, 'ios')
|
|
5
|
-
|
|
6
|
-
Pod::Spec.new do |s|
|
|
7
|
-
s.name = 'RNFaceSDK'
|
|
8
|
-
s.version = '8.3.1398-rc'
|
|
9
|
-
s.summary = package['description']
|
|
10
|
-
s.license = package['license']
|
|
11
|
-
|
|
12
|
-
s.authors = { 'RegulaForensics' => 'support@regulaforensics.com' }
|
|
13
|
-
s.homepage = 'https://regulaforensics.com'
|
|
14
|
-
|
|
15
|
-
s.source = { http: "file:#{source}" }
|
|
16
|
-
s.ios.deployment_target = '13.0'
|
|
17
|
-
s.source_files = [ 'ios/**/*.swift', 'ios/**/RN*.m' ]
|
|
18
|
-
s.exclude_files = [ 'ios/CDVFaceSDK.swift' ]
|
|
19
|
-
s.dependency 'FaceSDKStage', '8.4.4975'
|
|
20
|
-
s.dependency 'React'
|
|
21
|
-
end
|
package/android/build.gradle
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
apply plugin: 'com.android.library'
|
|
2
|
-
apply plugin: 'kotlin-android'
|
|
3
|
-
|
|
4
|
-
android {
|
|
5
|
-
// Conditional for compatibility with AGP <4.2.
|
|
6
|
-
if (project.android.hasProperty("namespace")) {
|
|
7
|
-
namespace 'com.regula.plugin.facesdk'
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
compileSdk 36
|
|
11
|
-
|
|
12
|
-
defaultConfig {
|
|
13
|
-
minSdkVersion 24
|
|
14
|
-
targetSdk 36
|
|
15
|
-
versionCode 1
|
|
16
|
-
versionName "1.0"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
rootProject.allprojects {
|
|
21
|
-
repositories {
|
|
22
|
-
maven {
|
|
23
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
dependencies {
|
|
29
|
-
//noinspection GradleDynamicVersion
|
|
30
|
-
implementation 'com.facebook.react:react-native:+'
|
|
31
|
-
//noinspection GradleDependency
|
|
32
|
-
implementation('com.regula.face:api:8.3.5405'){
|
|
33
|
-
transitive = true
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
package/android/cordova.gradle
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
android {
|
|
2
|
-
aaptOptions {
|
|
3
|
-
noCompress "Regula/faceSdkResource.dat"
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
repositories {
|
|
8
|
-
maven {
|
|
9
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
dependencies {
|
|
14
|
-
//noinspection GradleDependency
|
|
15
|
-
implementation('com.regula.face:api:8.3.5405'){
|
|
16
|
-
transitive = true
|
|
17
|
-
}
|
|
18
|
-
}
|