@regulaforensics/face-sdk 8.3.1174-rc → 8.3.1177-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/RNFaceSDK.podspec +2 -2
- package/android/build.gradle +1 -1
- package/android/cordova.gradle +1 -1
- package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +91 -0
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +106 -3
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +39 -1
- package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +0 -1
- package/examples/capacitor/README.md +1 -1
- package/examples/capacitor/package.json +2 -2
- package/examples/capacitor/scripts/android.sh +3 -1
- package/examples/capacitor/scripts/ios.sh +3 -1
- package/examples/capacitor/scripts/setup.sh +2 -0
- package/examples/ionic/README.md +1 -1
- package/examples/ionic/config.xml +0 -2
- package/examples/ionic/index.tsx +1 -1
- package/examples/ionic/package-lock.json +2360 -1733
- package/examples/ionic/package.json +21 -25
- package/examples/ionic/scripts/android.sh +4 -1
- package/examples/ionic/scripts/ios.sh +4 -1
- package/examples/ionic/scripts/setup.sh +2 -0
- package/examples/ionic/tsconfig.json +1 -1
- package/examples/react_native/README.md +1 -1
- package/examples/react_native/package.json +2 -2
- package/examples/react_native/scripts/android.sh +5 -5
- package/examples/react_native/scripts/ios.sh +5 -5
- package/examples/react_native/scripts/setup.sh +2 -0
- package/ios/Config.swift +107 -1
- package/ios/Decoder.swift +71 -3
- package/ios/Main.swift +24 -4
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/json.tsx +135 -57
- package/test/package-lock.json +1 -1
- package/test/test.tsx +183 -60
- package/www/capacitor/customization/customization_images.js +48 -0
- package/www/capacitor/customization/font.js +3 -3
- package/www/capacitor/detect_faces/detect_faces_config.js +5 -5
- package/www/capacitor/detect_faces/detect_faces_request.js +2 -2
- package/www/capacitor/face_capture/face_capture_config.js +14 -14
- package/www/capacitor/image_params/output_image_crop.js +4 -4
- package/www/capacitor/image_params/output_image_params.js +3 -3
- package/www/capacitor/image_quality/image_quality_characteristic.js +4 -4
- package/www/capacitor/image_quality/image_quality_group.js +2 -2
- package/www/capacitor/index.js +153 -32
- package/www/capacitor/init/init_config.js +2 -2
- package/www/capacitor/internal/bridge.js +2 -2
- package/www/capacitor/internal/cordova.js +2 -2
- package/www/capacitor/liveness/enrollment_config.js +102 -0
- package/www/capacitor/liveness/enrollment_request.js +39 -0
- package/www/capacitor/liveness/enrollment_response.js +26 -0
- package/www/capacitor/liveness/error_response.js +21 -0
- package/www/capacitor/liveness/liveness_config.js +18 -17
- package/www/capacitor/liveness/liveness_exception.js +7 -5
- package/www/capacitor/liveness/liveness_notification.js +2 -0
- package/www/capacitor/liveness/verification_config.js +98 -0
- package/www/capacitor/liveness/verification_response.js +27 -0
- package/www/capacitor/liveness/verify_match_response.js +21 -0
- package/www/capacitor/match_faces/match_faces_config.js +3 -3
- package/www/capacitor/match_faces/match_faces_image.js +2 -2
- package/www/capacitor/match_faces/match_faces_request.js +4 -4
- package/www/capacitor/person_database/edit_group_persons_request.js +3 -3
- package/www/capacitor/person_database/person_database.js +4 -4
- package/www/capacitor/person_database/search_person_request.js +7 -7
- package/www/cordova.js +703 -173
- package/www/react-native/customization/customization_images.js +48 -0
- package/www/react-native/customization/font.js +3 -3
- package/www/react-native/detect_faces/detect_faces_config.js +5 -5
- package/www/react-native/detect_faces/detect_faces_request.js +2 -2
- package/www/react-native/face_capture/face_capture_config.js +14 -14
- package/www/react-native/image_params/output_image_crop.js +4 -4
- package/www/react-native/image_params/output_image_params.js +3 -3
- package/www/react-native/image_quality/image_quality_characteristic.js +4 -4
- package/www/react-native/image_quality/image_quality_group.js +2 -2
- package/www/react-native/index.js +153 -32
- package/www/react-native/init/init_config.js +2 -2
- package/www/react-native/internal/bridge.js +2 -2
- package/www/react-native/liveness/enrollment_config.js +102 -0
- package/www/react-native/liveness/enrollment_request.js +39 -0
- package/www/react-native/liveness/enrollment_response.js +26 -0
- package/www/react-native/liveness/error_response.js +21 -0
- package/www/react-native/liveness/liveness_config.js +18 -17
- package/www/react-native/liveness/liveness_exception.js +7 -5
- package/www/react-native/liveness/liveness_notification.js +2 -0
- package/www/react-native/liveness/verification_config.js +98 -0
- package/www/react-native/liveness/verification_response.js +27 -0
- package/www/react-native/liveness/verify_match_response.js +21 -0
- package/www/react-native/match_faces/match_faces_config.js +3 -3
- package/www/react-native/match_faces/match_faces_image.js +2 -2
- package/www/react-native/match_faces/match_faces_request.js +4 -4
- package/www/react-native/person_database/edit_group_persons_request.js +3 -3
- package/www/react-native/person_database/person_database.js +4 -4
- package/www/react-native/person_database/search_person_request.js +7 -7
- package/www/types/customization/customization_images.d.ts +6 -0
- package/www/types/customization/font.d.ts +1 -1
- package/www/types/detect_faces/detect_faces_config.d.ts +1 -1
- package/www/types/detect_faces/detect_faces_request.d.ts +1 -1
- package/www/types/face_capture/face_capture_config.d.ts +1 -1
- package/www/types/image_params/output_image_crop.d.ts +1 -1
- package/www/types/image_params/output_image_params.d.ts +1 -1
- package/www/types/image_quality/image_quality_group.d.ts +1 -1
- package/www/types/index.d.ts +137 -15
- package/www/types/init/init_config.d.ts +1 -1
- package/www/types/liveness/enrollment_config.d.ts +97 -0
- package/www/types/liveness/enrollment_request.d.ts +24 -0
- package/www/types/liveness/enrollment_response.d.ts +9 -0
- package/www/types/liveness/error_response.d.ts +6 -0
- package/www/types/liveness/liveness_config.d.ts +2 -1
- package/www/types/liveness/liveness_exception.d.ts +32 -2
- package/www/types/liveness/liveness_notification.d.ts +2 -0
- package/www/types/liveness/verification_config.d.ts +95 -0
- package/www/types/liveness/verification_response.d.ts +10 -0
- package/www/types/liveness/verify_match_response.d.ts +6 -0
- package/www/types/match_faces/match_faces_config.d.ts +1 -1
- package/www/types/match_faces/match_faces_image.d.ts +1 -1
- package/www/types/match_faces/match_faces_request.d.ts +1 -1
- package/www/types/person_database/edit_group_persons_request.d.ts +1 -1
- package/www/types/person_database/person_database.d.ts +2 -2
- package/www/types/person_database/search_person_request.d.ts +1 -1
|
@@ -7,23 +7,23 @@
|
|
|
7
7
|
"postinstall": "patch-package"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@angular-devkit/build-angular": "^
|
|
11
|
-
"@angular/cli": "^
|
|
12
|
-
"@angular/common": "^
|
|
13
|
-
"@angular/compiler-cli": "^
|
|
14
|
-
"@angular/core": "^
|
|
15
|
-
"@angular/forms": "^
|
|
16
|
-
"@angular/platform-browser-dynamic": "^
|
|
17
|
-
"@angular/router": "^
|
|
18
|
-
"@ionic/angular": "^8.8.
|
|
10
|
+
"@angular-devkit/build-angular": "^22.0.5",
|
|
11
|
+
"@angular/cli": "^22.0.5",
|
|
12
|
+
"@angular/common": "^22.0.5",
|
|
13
|
+
"@angular/compiler-cli": "^22.0.5",
|
|
14
|
+
"@angular/core": "^22.0.5",
|
|
15
|
+
"@angular/forms": "^22.0.5",
|
|
16
|
+
"@angular/platform-browser-dynamic": "^22.0.5",
|
|
17
|
+
"@angular/router": "^22.0.5",
|
|
18
|
+
"@ionic/angular": "^8.8.13",
|
|
19
19
|
"@ionic/cordova-builders": "^12.3.0",
|
|
20
|
-
"@awesome-cordova-plugins/camera": "^
|
|
21
|
-
"@awesome-cordova-plugins/dialogs": "^
|
|
22
|
-
"@awesome-cordova-plugins/file": "^
|
|
23
|
-
"@regulaforensics/face-sdk": "8.3.
|
|
24
|
-
"@regulaforensics/face-core-basic": "8.3.
|
|
25
|
-
"cordova-android": "^
|
|
26
|
-
"cordova-ios": "^8.
|
|
20
|
+
"@awesome-cordova-plugins/camera": "^9.2.0",
|
|
21
|
+
"@awesome-cordova-plugins/dialogs": "^9.2.0",
|
|
22
|
+
"@awesome-cordova-plugins/file": "^9.2.0",
|
|
23
|
+
"@regulaforensics/face-sdk": "8.3.1177-rc",
|
|
24
|
+
"@regulaforensics/face-core-basic": "8.3.644-rc",
|
|
25
|
+
"cordova-android": "^15.0.0",
|
|
26
|
+
"cordova-ios": "^8.1.1",
|
|
27
27
|
"cordova-plugin-camera": "^8.0.0",
|
|
28
28
|
"cordova-plugin-dialogs": "^2.0.2",
|
|
29
29
|
"cordova-plugin-file": "^8.1.3",
|
|
@@ -31,18 +31,14 @@
|
|
|
31
31
|
"patch-package": "^8.0.1"
|
|
32
32
|
},
|
|
33
33
|
"overrides": {
|
|
34
|
-
"ajv": "^8.18.0",
|
|
35
|
-
"serialize-javascript": "^7.0.4",
|
|
36
|
-
"undici": "^7.24.0",
|
|
37
|
-
"picomatch": "^4.0.4",
|
|
38
|
-
"postcss": "^8.5.10",
|
|
39
|
-
"uuid": "^14.0.0",
|
|
40
|
-
"vite": "^7.3.2",
|
|
41
|
-
"webpack-dev-server": "^5.2.4",
|
|
42
34
|
"@babel/core": "^7.29.0",
|
|
35
|
+
"ajv": "^8.18.0",
|
|
43
36
|
"esbuild": "^0.28.1",
|
|
44
37
|
"http-proxy-middleware": "^3.0.7",
|
|
45
|
-
"
|
|
38
|
+
"picomatch": "^4.0.4",
|
|
39
|
+
"serialize-javascript": "^7.0.4",
|
|
40
|
+
"uuid": "^14.0.0",
|
|
41
|
+
"webpack-dev-server": "^5.2.4"
|
|
46
42
|
},
|
|
47
43
|
"cordova": {
|
|
48
44
|
"plugins": {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
2
3
|
|
|
3
|
-
if [[
|
|
4
|
+
if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
|
|
4
5
|
ionic cordova build android
|
|
5
6
|
open -a 'Android Studio' platforms/android
|
|
6
7
|
else
|
|
7
8
|
ionic cordova run android
|
|
8
9
|
fi
|
|
10
|
+
|
|
11
|
+
exit 0
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
2
3
|
|
|
3
|
-
if [[
|
|
4
|
+
if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
|
|
4
5
|
ionic cordova prepare ios
|
|
5
6
|
open platforms/ios/App.xcworkspace
|
|
6
7
|
else
|
|
7
8
|
ionic cordova run ios
|
|
8
9
|
fi
|
|
10
|
+
|
|
11
|
+
exit 0
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* IOS: `npm run ios`.
|
|
10
10
|
* Android: `npm run android`.
|
|
11
11
|
|
|
12
|
-
**Note**: this is just one way of running the app. You can also pass
|
|
12
|
+
**Note**: this is just one way of running the app. You can also pass `-- -o` or `-- --open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE. Just don't forget to make sure that Metro Bundler is running(`npm start`).
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
## How to use offline match
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"start": "expo start"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@regulaforensics/face-sdk": "8.3.
|
|
12
|
-
"@regulaforensics/face-core-basic": "8.3.
|
|
11
|
+
"@regulaforensics/face-sdk": "8.3.1177-rc",
|
|
12
|
+
"@regulaforensics/face-core-basic": "8.3.644-rc",
|
|
13
13
|
"react-native": "^0.81.4",
|
|
14
14
|
"react-native-fs": "^2.20.0",
|
|
15
15
|
"react-native-image-picker": "^8.2.1",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
2
3
|
|
|
3
4
|
adb reverse tcp:8081 tcp:8081 >/dev/null || :
|
|
4
|
-
if [[
|
|
5
|
+
if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
|
|
5
6
|
open -a 'Android Studio' android
|
|
6
7
|
# check if metro is already running
|
|
7
|
-
|
|
8
|
-
watchman shutdown-server # fix potential errors
|
|
9
|
-
npm start
|
|
10
|
-
fi
|
|
8
|
+
[[ -z $(pgrep -f 'expo start') ]] && npm start
|
|
11
9
|
else
|
|
12
10
|
expo run:android --device
|
|
13
11
|
fi
|
|
12
|
+
|
|
13
|
+
exit 0
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
2
3
|
|
|
3
|
-
if [[
|
|
4
|
+
if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
|
|
4
5
|
open ios/Face.xcworkspace
|
|
5
6
|
# check if metro is already running
|
|
6
|
-
|
|
7
|
-
watchman shutdown-server # fix potential errors
|
|
8
|
-
npm start
|
|
9
|
-
fi
|
|
7
|
+
[[ -z $(pgrep -f 'expo start') ]] && npm start
|
|
10
8
|
else
|
|
11
9
|
npx expo run:ios --device
|
|
12
10
|
fi
|
|
11
|
+
|
|
12
|
+
exit 0
|
|
@@ -8,3 +8,5 @@ expo prebuild
|
|
|
8
8
|
if ! grep -q faceSdkResource android/app/build.gradle && grep -q face-core-match package.json; then
|
|
9
9
|
sed -i '' "s/androidResources/aaptOptions {\n\t\tnoCompress 'Regula\/faceSdkResource.dat'\n\t}\n\tandroidResources/" android/app/build.gradle
|
|
10
10
|
fi
|
|
11
|
+
|
|
12
|
+
exit 0
|
package/ios/Config.swift
CHANGED
|
@@ -63,7 +63,7 @@ public extension FaceCaptureConfiguration {
|
|
|
63
63
|
public extension LivenessConfiguration {
|
|
64
64
|
static func decode(_ it: Any?) -> Self? {
|
|
65
65
|
guard let it = it as? [String: Any] else { return nil }
|
|
66
|
-
return Self(
|
|
66
|
+
return Self.init({ builder in
|
|
67
67
|
for (k, v) in it {
|
|
68
68
|
switch k {
|
|
69
69
|
case("copyright"): builder.isCopyright = v as! Bool
|
|
@@ -107,6 +107,112 @@ public extension LivenessConfiguration {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
//public extension EnrollmentConfiguration {
|
|
111
|
+
// static func decode2(_ it: [String: Any]) -> Self {
|
|
112
|
+
// return Self.init({ builder in
|
|
113
|
+
// for (k, v) in it {
|
|
114
|
+
// switch k {
|
|
115
|
+
// case("copyright"): builder.isCopyright = v as! Bool
|
|
116
|
+
// case("cameraSwitchEnabled"): builder.isCameraSwitchButtonEnabled = v as! Bool
|
|
117
|
+
// case("closeButtonEnabled"): builder.isCloseButtonEnabled = v as! Bool
|
|
118
|
+
// case("torchButtonEnabled"): builder.isTorchButtonEnabled = v as! Bool
|
|
119
|
+
// case("vibrateOnSteps"): builder.vibrateOnSteps = v as! Bool
|
|
120
|
+
// case("cameraPositionIOS"): builder.cameraPosition = CameraPosition(rawValue: v as! Int)!
|
|
121
|
+
// case("attemptsCount"): builder.attemptsCount = v as! Int
|
|
122
|
+
// case("locationTrackingEnabled"): builder.isLocationTrackingEnabled = v as! Bool
|
|
123
|
+
// case("preventScreenRecording"): builder.isPreventScreenRecordingEnable = v as! Bool
|
|
124
|
+
// case("recordingProcess"): builder.recordingProcess = RecordingProcess(rawValue: v as! Int)!
|
|
125
|
+
// case("livenessType"): builder.livenessType = LivenessType(rawValue: v as! Int)!
|
|
126
|
+
// case("screenOrientation"): builder.screenOrientation = RFSScreenOrientation.decode(v)
|
|
127
|
+
// case("tag"): builder.tag = v as? String
|
|
128
|
+
// case("externalId"): builder.externalId = v as! String
|
|
129
|
+
// case("groupId"): builder.groupId = v as? String
|
|
130
|
+
// case("checkDuplicatesEnabled"): builder.checkDuplicatesEnabled = v as? NSNumber
|
|
131
|
+
// case("duplicatesThreshold"): builder.duplicatesThreshold = v as? NSNumber
|
|
132
|
+
// case("skipStep"): builder.stepSkippingMask = RFSLivenessStepSkip.decode(v)
|
|
133
|
+
// case("metadata"): builder.metadata = v as! [String: Any]
|
|
134
|
+
// default: break
|
|
135
|
+
// }
|
|
136
|
+
// }
|
|
137
|
+
// })
|
|
138
|
+
// }
|
|
139
|
+
// func encode2() -> [String: Any?] {
|
|
140
|
+
// return [
|
|
141
|
+
// "copyright": self.isCopyright,
|
|
142
|
+
// "cameraSwitchEnabled": self.isCameraSwitchButtonEnabled,
|
|
143
|
+
// "closeButtonEnabled": self.isCloseButtonEnabled,
|
|
144
|
+
// "torchButtonEnabled": self.isTorchButtonEnabled,
|
|
145
|
+
// "vibrateOnSteps": self.vibrateOnSteps,
|
|
146
|
+
// "cameraPositionIOS": self.cameraPosition.rawValue,
|
|
147
|
+
// "attemptsCount": self.attemptsCount,
|
|
148
|
+
// "locationTrackingEnabled": self.isLocationTrackingEnabled,
|
|
149
|
+
// "preventScreenRecording": self.isPreventScreenRecordingEnable,
|
|
150
|
+
// "recordingProcess": self.recordingProcess.rawValue,
|
|
151
|
+
// "livenessType": self.livenessType.rawValue,
|
|
152
|
+
// "screenOrientation": self.screenOrientation.encode(),
|
|
153
|
+
// "tag": self.tag,
|
|
154
|
+
// "externalId": self.externalId,
|
|
155
|
+
// "groupId": self.groupId,
|
|
156
|
+
// "checkDuplicatesEnabled": self.checkDuplicatesEnabled,
|
|
157
|
+
// "duplicatesThreshold": self.duplicatesThreshold,
|
|
158
|
+
// "skipStep": self.stepSkippingMask.encode(),
|
|
159
|
+
// "metadata": self.metadata,
|
|
160
|
+
// ]
|
|
161
|
+
// }
|
|
162
|
+
//}
|
|
163
|
+
//
|
|
164
|
+
//public extension VerificationConfiguration {
|
|
165
|
+
// static func decode2(_ it: [String: Any]) -> Self {
|
|
166
|
+
// return Self.init({ builder in
|
|
167
|
+
// for (k, v) in it {
|
|
168
|
+
// switch k {
|
|
169
|
+
// case("copyright"): builder.isCopyright = v as! Bool
|
|
170
|
+
// case("cameraSwitchEnabled"): builder.isCameraSwitchButtonEnabled = v as! Bool
|
|
171
|
+
// case("closeButtonEnabled"): builder.isCloseButtonEnabled = v as! Bool
|
|
172
|
+
// case("torchButtonEnabled"): builder.isTorchButtonEnabled = v as! Bool
|
|
173
|
+
// case("vibrateOnSteps"): builder.vibrateOnSteps = v as! Bool
|
|
174
|
+
// case("cameraPositionIOS"): builder.cameraPosition = CameraPosition(rawValue: v as! Int)!
|
|
175
|
+
// case("attemptsCount"): builder.attemptsCount = v as! Int
|
|
176
|
+
// case("locationTrackingEnabled"): builder.isLocationTrackingEnabled = v as! Bool
|
|
177
|
+
// case("preventScreenRecording"): builder.isPreventScreenRecordingEnable = v as! Bool
|
|
178
|
+
// case("recordingProcess"): builder.recordingProcess = RecordingProcess(rawValue: v as! Int)!
|
|
179
|
+
// case("livenessType"): builder.livenessType = LivenessType(rawValue: v as! Int)!
|
|
180
|
+
// case("screenOrientation"): builder.screenOrientation = RFSScreenOrientation.decode(v)
|
|
181
|
+
// case("tag"): builder.tag = v as? String
|
|
182
|
+
// case("personId"): builder.personId = v as! String
|
|
183
|
+
// case("groupId"): builder.groupId = v as? String
|
|
184
|
+
// case("threshold"): builder.threshold = v as? NSNumber
|
|
185
|
+
// case("skipStep"): builder.stepSkippingMask = RFSLivenessStepSkip.decode(v)
|
|
186
|
+
// case("metadata"): builder.metadata = v as! [String: Any]
|
|
187
|
+
// default: break
|
|
188
|
+
// }
|
|
189
|
+
// }
|
|
190
|
+
// })
|
|
191
|
+
// }
|
|
192
|
+
// func encode2() -> [String: Any?] {
|
|
193
|
+
// return [
|
|
194
|
+
// "copyright": self.isCopyright,
|
|
195
|
+
// "cameraSwitchEnabled": self.isCameraSwitchButtonEnabled,
|
|
196
|
+
// "closeButtonEnabled": self.isCloseButtonEnabled,
|
|
197
|
+
// "torchButtonEnabled": self.isTorchButtonEnabled,
|
|
198
|
+
// "vibrateOnSteps": self.vibrateOnSteps,
|
|
199
|
+
// "cameraPositionIOS": self.cameraPosition.rawValue,
|
|
200
|
+
// "attemptsCount": self.attemptsCount,
|
|
201
|
+
// "locationTrackingEnabled": self.isLocationTrackingEnabled,
|
|
202
|
+
// "preventScreenRecording": self.isPreventScreenRecordingEnable,
|
|
203
|
+
// "recordingProcess": self.recordingProcess.rawValue,
|
|
204
|
+
// "livenessType": self.livenessType.rawValue,
|
|
205
|
+
// "screenOrientation": self.screenOrientation.encode(),
|
|
206
|
+
// "tag": self.tag,
|
|
207
|
+
// "personId": self.personId,
|
|
208
|
+
// "groupId": self.groupId,
|
|
209
|
+
// "threshold": self.threshold,
|
|
210
|
+
// "skipStep": self.stepSkippingMask.encode(),
|
|
211
|
+
// "metadata": self.metadata,
|
|
212
|
+
// ]
|
|
213
|
+
// }
|
|
214
|
+
//}
|
|
215
|
+
|
|
110
216
|
public extension MatchFacesConfiguration {
|
|
111
217
|
static func decode(_ it: Any?) -> Self? {
|
|
112
218
|
guard let it = it as? [String: Any] else { return nil }
|
package/ios/Decoder.swift
CHANGED
|
@@ -112,17 +112,17 @@ public extension LivenessResponse {
|
|
|
112
112
|
static func decode(_ it: Any?) -> Self {
|
|
113
113
|
let it = it as! [String: Any]
|
|
114
114
|
let alloc = LivenessResponse.allocate()
|
|
115
|
-
let sel = "initWithTag:transactionId:estimatedAge:status:image:error:".selector()
|
|
115
|
+
let sel = "initWithTag:transactionId:estimatedAge:status:image:error:enrollResponse:verifyResponse:".selector()
|
|
116
116
|
return privateInit(alloc, sel, (@convention(c)(
|
|
117
117
|
AnyObject, Selector,
|
|
118
|
-
Any?, Any?, Any?, Int, Any?, Any?) -> Unmanaged<AnyObject>?).self, { f in f(
|
|
118
|
+
Any?, Any?, Any?, Int, Any?, Any?, Any?, Any?) -> Unmanaged<AnyObject>?).self, { f in f(
|
|
119
119
|
alloc, sel,
|
|
120
120
|
it["tag"],
|
|
121
121
|
it["transactionId"],
|
|
122
122
|
it["estimatedAge"],
|
|
123
123
|
it["liveness"] as! Int,
|
|
124
124
|
UIImage.decode(it["image"]),
|
|
125
|
-
nil
|
|
125
|
+
nil, nil, nil
|
|
126
126
|
)})
|
|
127
127
|
}
|
|
128
128
|
func encode() -> [String: Any?] {
|
|
@@ -144,6 +144,74 @@ func generateLivenessNotification(_ status: LivenessProcessStatus, _ result: Liv
|
|
|
144
144
|
]
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
//public extension ErrorResponse {
|
|
148
|
+
// static func decode(_ it: Any?) -> ErrorResponse? {
|
|
149
|
+
// guard let it = it as? [String: Any] else { return nil }
|
|
150
|
+
// let result = ErrorResponse.emptyInit() as ErrorResponse
|
|
151
|
+
// result.setValue(it["code"] as Any?, forKey: "code")
|
|
152
|
+
// result.setValue(it["message"] as Any?, forKey: "message")
|
|
153
|
+
// return result
|
|
154
|
+
// }
|
|
155
|
+
// func encode() -> [String: Any?] {
|
|
156
|
+
// return [
|
|
157
|
+
// "code": self.code,
|
|
158
|
+
// "message": self.message,
|
|
159
|
+
// ]
|
|
160
|
+
// }
|
|
161
|
+
//}
|
|
162
|
+
//
|
|
163
|
+
//public extension EnrollmentResponse {
|
|
164
|
+
// static func decode(_ it: Any?) -> EnrollmentResponse? {
|
|
165
|
+
// guard let it = it as? [String: Any] else { return nil }
|
|
166
|
+
// let result = EnrollmentResponse.emptyInit() as EnrollmentResponse
|
|
167
|
+
// result.setValue(ErrorResponse.decode(it["error"]), forKey: "error")
|
|
168
|
+
// result.setValue(it["personId"] as Any?, forKey: "personId")
|
|
169
|
+
// result.setValue(it["externalId"] as Any?, forKey: "externalId")
|
|
170
|
+
// return result
|
|
171
|
+
// }
|
|
172
|
+
// func encode() -> [String: Any?] {
|
|
173
|
+
// return [
|
|
174
|
+
// "error": self.error?.encode(),
|
|
175
|
+
// "personId": self.personId,
|
|
176
|
+
// "externalId": self.externalId,
|
|
177
|
+
// ]
|
|
178
|
+
// }
|
|
179
|
+
//}
|
|
180
|
+
//
|
|
181
|
+
//public extension VerifyMatchResponse {
|
|
182
|
+
// static func decode(_ it: Any?) -> VerifyMatchResponse? {
|
|
183
|
+
// guard let it = it as? [String: Any] else { return nil }
|
|
184
|
+
// let result = VerifyMatchResponse.emptyInit() as VerifyMatchResponse
|
|
185
|
+
// result.setValue(it["passed"] as Any?, forKey: "passed")
|
|
186
|
+
// result.setValue(it["similarity"] as Any?, forKey: "similarity")
|
|
187
|
+
// return result
|
|
188
|
+
// }
|
|
189
|
+
// func encode() -> [String: Any?] {
|
|
190
|
+
// return [
|
|
191
|
+
// "passed": self.passed,
|
|
192
|
+
// "similarity": self.similarity,
|
|
193
|
+
// ]
|
|
194
|
+
// }
|
|
195
|
+
//}
|
|
196
|
+
//
|
|
197
|
+
//public extension VerificationResponse {
|
|
198
|
+
// static func decode(_ it: Any?) -> VerificationResponse? {
|
|
199
|
+
// guard let it = it as? [String: Any] else { return nil }
|
|
200
|
+
// let result = VerificationResponse.emptyInit() as VerificationResponse
|
|
201
|
+
// result.setValue(VerifyMatchResponse.decode(it["match"]), forKey: "match")
|
|
202
|
+
// result.setValue(ErrorResponse.decode(it["error"]), forKey: "error")
|
|
203
|
+
// result.setValue(it["passed"] as Any?, forKey: "passed")
|
|
204
|
+
// return result
|
|
205
|
+
// }
|
|
206
|
+
// func encode() -> [String: Any?] {
|
|
207
|
+
// return [
|
|
208
|
+
// "match": self.match?.encode(),
|
|
209
|
+
// "error": self.error?.encode(),
|
|
210
|
+
// "passed": self.passed,
|
|
211
|
+
// ]
|
|
212
|
+
// }
|
|
213
|
+
//}
|
|
214
|
+
|
|
147
215
|
// MARK: - MatchFacesRequest
|
|
148
216
|
|
|
149
217
|
public extension MatchFacesImage {
|
package/ios/Main.swift
CHANGED
|
@@ -44,8 +44,7 @@ func methodCall(_ method: String, _ callback: @escaping Callback) {
|
|
|
44
44
|
from: rootViewController()!,
|
|
45
45
|
animated: true,
|
|
46
46
|
configuration: config,
|
|
47
|
-
onCapture: { callback($0.encode()) }
|
|
48
|
-
completion: nil)
|
|
47
|
+
onCapture: { callback($0.encode()) })
|
|
49
48
|
}
|
|
50
49
|
case("stopFaceCapture"): face.stopFaceCaptureViewController()
|
|
51
50
|
case("startLiveness"): let config = LivenessConfiguration.decode(argsNullable(0))
|
|
@@ -54,9 +53,30 @@ func methodCall(_ method: String, _ callback: @escaping Callback) {
|
|
|
54
53
|
from: rootViewController()!,
|
|
55
54
|
animated: true,
|
|
56
55
|
configuration: config,
|
|
57
|
-
onLiveness: { callback($0.encode()) }
|
|
58
|
-
completion: nil)
|
|
56
|
+
onLiveness: { callback($0.encode()) })
|
|
59
57
|
}
|
|
58
|
+
// case("startEnrollment"): let config = EnrollmentConfiguration.decode2(args(0))
|
|
59
|
+
// DispatchQueue.main.async {
|
|
60
|
+
// face.startEnrollment(
|
|
61
|
+
// from: rootViewController()!,
|
|
62
|
+
// animated: true,
|
|
63
|
+
// configuration: config,
|
|
64
|
+
// onEnrollment: { callback([
|
|
65
|
+
// "livenessResponse": $0.encode(),
|
|
66
|
+
// "enrollmentResponse": $1?.encode()
|
|
67
|
+
// ]) })
|
|
68
|
+
// }
|
|
69
|
+
// case("startVerification"): let config = VerificationConfiguration.decode2(args(0))
|
|
70
|
+
// DispatchQueue.main.async {
|
|
71
|
+
// face.startVerification(
|
|
72
|
+
// from: rootViewController()!,
|
|
73
|
+
// animated: true,
|
|
74
|
+
// configuration: config,
|
|
75
|
+
// onVerification: { callback([
|
|
76
|
+
// "livenessResponse": $0.encode(),
|
|
77
|
+
// "verificationResponse": $1?.encode()
|
|
78
|
+
// ]) })
|
|
79
|
+
// }
|
|
60
80
|
case("stopLiveness"): face.stopLivenessProcessing()
|
|
61
81
|
case("matchFaces"): face.matchFaces(
|
|
62
82
|
MatchFacesRequest.decode(args(0)),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/face-sdk",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.1177-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.1177-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>
|
|
@@ -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.3.
|
|
30
|
+
<pod name="FaceSDKStage" spec="8.3.4623" />
|
|
31
31
|
</pods>
|
|
32
32
|
</podspec>
|
|
33
33
|
</platform>
|