@regulaforensics/face-sdk 8.5.1574-nightly → 8.5.1575-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 +1 -1
- package/android/build.gradle.kts +1 -1
- package/android/cordova.gradle.kts +1 -1
- package/android/src/main/kotlin/com/regula/plugin/face/sdk/Config.kt +19 -1
- package/android/src/main/kotlin/com/regula/plugin/face/sdk/JSONConstructor.kt +16 -16
- package/examples/capacitor/ios/App/App/Info.plist +2 -0
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +4 -4
- package/examples/capacitor/package-lock.json +590 -209
- package/examples/capacitor/package.json +8 -3
- package/examples/ionic/config.xml +1 -1
- package/examples/ionic/package-lock.json +2136 -2488
- package/examples/ionic/package.json +20 -3
- package/examples/react_native/package-lock.json +571 -927
- package/examples/react_native/package.json +10 -3
- package/examples/react_native/scripts/withoutMetroServer.js +11 -8
- package/ios/Config.swift +21 -29
- package/ios/Decoder.swift +25 -21
- package/ios/Implementation.swift +3 -3
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/react-native-face-sdk.podspec +2 -2
- package/test/json.tsx +12 -0
- package/test/package-lock.json +5 -2
- package/test/test.tsx +66 -74
- package/www/capacitor/customization/customization_images.js +8 -0
- package/www/capacitor/customization/screen_orientation.js +2 -0
- package/www/capacitor/detect_faces/detect_faces_response.js +3 -0
- package/www/capacitor/face_capture/face_capture_config.js +12 -0
- package/www/capacitor/liveness/enrollment_config.js +8 -0
- package/www/capacitor/liveness/liveness_config.js +8 -0
- package/www/capacitor/liveness/liveness_notification.js +4 -2
- package/www/capacitor/liveness/verification_config.js +8 -0
- package/www/capacitor/match_faces/match_faces_response.js +3 -0
- package/www/cordova.js +56 -2
- package/www/react-native/customization/customization_images.js +8 -0
- package/www/react-native/customization/screen_orientation.js +2 -0
- package/www/react-native/detect_faces/detect_faces_response.js +3 -0
- package/www/react-native/face_capture/face_capture_config.js +12 -0
- package/www/react-native/liveness/enrollment_config.js +8 -0
- package/www/react-native/liveness/liveness_config.js +8 -0
- package/www/react-native/liveness/liveness_notification.js +4 -2
- package/www/react-native/liveness/verification_config.js +8 -0
- package/www/react-native/match_faces/match_faces_response.js +3 -0
- package/www/types/customization/customization_images.d.ts +1 -0
- package/www/types/customization/screen_orientation.d.ts +4 -0
- package/www/types/detect_faces/detect_faces_response.d.ts +3 -0
- package/www/types/face_capture/face_capture_config.d.ts +15 -0
- package/www/types/liveness/enrollment_config.d.ts +6 -0
- package/www/types/liveness/liveness_backend_exception.d.ts +1 -1
- package/www/types/liveness/liveness_config.d.ts +8 -0
- package/www/types/liveness/liveness_notification.d.ts +2 -0
- package/www/types/liveness/verification_config.d.ts +8 -0
- package/www/types/match_faces/match_faces_response.d.ts +3 -0
package/Package.swift
CHANGED
|
@@ -10,7 +10,7 @@ let package = Package(
|
|
|
10
10
|
.package(url: "https://github.com/apache/cordova-ios.git", branch: "master"),
|
|
11
11
|
.package(
|
|
12
12
|
url: "https://github.com/regulaforensics/FaceSDK-Swift-Package",
|
|
13
|
-
exact: "8.5.
|
|
13
|
+
exact: "8.5.5291-rc"
|
|
14
14
|
)
|
|
15
15
|
],
|
|
16
16
|
targets: [
|
package/android/build.gradle.kts
CHANGED
|
@@ -31,7 +31,7 @@ dependencies {
|
|
|
31
31
|
//noinspection GradleDynamicVersion
|
|
32
32
|
implementation("com.facebook.react:react-native:+")
|
|
33
33
|
//noinspection GradleDependency
|
|
34
|
-
implementation("com.regula.face:api:8.
|
|
34
|
+
implementation("com.regula.face:api:8.5.5703") {
|
|
35
35
|
isTransitive = true
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -28,6 +28,9 @@ fun setFaceCaptureConfig(builder: FaceCaptureConfiguration.Builder, config: JSON
|
|
|
28
28
|
"detectOcclusion" -> builder.setDetectOcclusion(v as Boolean)
|
|
29
29
|
"showFaceAnimation" -> builder.setShowFaceAnimation(v as Boolean)
|
|
30
30
|
"preventScreenRecording" -> builder.setPreventScreenRecording(v as Boolean)
|
|
31
|
+
"usbCamera" -> builder.setUsbCamera(v as Boolean)
|
|
32
|
+
"usbCameraMirrorPreview" -> builder.setUsbCameraMirrorPreview(v as Boolean)
|
|
33
|
+
"rejectMultipleFaces" -> builder.setRejectMultipleFaces(v as Boolean)
|
|
31
34
|
"cameraPositionAndroid" -> builder.setCameraId(v.toInt())
|
|
32
35
|
"screenOrientation" -> builder.setScreenOrientation(*screenOrientationArrayFromJSON(v as JSONArray))
|
|
33
36
|
"timeout" -> builder.setTimeout(v.toFloat())
|
|
@@ -44,6 +47,9 @@ fun getFaceCaptureConfig(input: FaceCaptureConfiguration) = mapOf(
|
|
|
44
47
|
"detectOcclusion" to input.isDetectOcclusion,
|
|
45
48
|
"showFaceAnimation" to input.isShowFaceAnimation,
|
|
46
49
|
"preventScreenRecording" to input.doPreventScreenRecording(),
|
|
50
|
+
"usbCamera" to input.isUsbCamera,
|
|
51
|
+
"usbCameraMirrorPreview" to input.isUsbCameraMirrorPreview,
|
|
52
|
+
"rejectMultipleFaces" to input.isRejectMultipleFaces,
|
|
47
53
|
"cameraPositionAndroid" to input.cameraId,
|
|
48
54
|
"screenOrientation" to generateScreenOrientationArray(input.screenOrientation),
|
|
49
55
|
"timeout" to input.timeout,
|
|
@@ -62,6 +68,8 @@ fun setLivenessConfig(builder: LivenessConfiguration.Builder, config: JSONObject
|
|
|
62
68
|
"screenOrientation" -> builder.setScreenOrientation(*screenOrientationArrayFromJSON(v as JSONArray))
|
|
63
69
|
"locationTrackingEnabled" -> builder.setLocationTrackingEnabled(v as Boolean)
|
|
64
70
|
"preventScreenRecording" -> builder.setPreventScreenRecording(v as Boolean)
|
|
71
|
+
"usbCamera" -> builder.setUsbCamera(v as Boolean)
|
|
72
|
+
"usbCameraMirrorPreview" -> builder.setUsbCameraMirrorPreview(v as Boolean)
|
|
65
73
|
"attemptsCount" -> builder.setAttemptsCount(v.toInt())
|
|
66
74
|
"recordingProcess" -> builder.setRecordingProcess(RecordingProcess.values()[v.toInt()])
|
|
67
75
|
"livenessType" -> builder.setType(LivenessType.values()[v.toInt()])
|
|
@@ -81,6 +89,8 @@ fun getLivenessConfig(input: LivenessConfiguration) = mapOf(
|
|
|
81
89
|
"screenOrientation" to generateScreenOrientationArray(input.screenOrientation),
|
|
82
90
|
"locationTrackingEnabled" to input.isLocationTrackingEnabled,
|
|
83
91
|
"preventScreenRecording" to input.doPreventScreenRecording(),
|
|
92
|
+
"usbCamera" to input.isUsbCamera,
|
|
93
|
+
"usbCameraMirrorPreview" to input.isUsbCameraMirrorPreview,
|
|
84
94
|
"attemptsCount" to input.attemptsCount,
|
|
85
95
|
"recordingProcess" to input.recordingProcess.ordinal,
|
|
86
96
|
"livenessType" to input.type.ordinal,
|
|
@@ -101,6 +111,8 @@ fun setEnrollmentConfig(builder: EnrollmentConfiguration.Builder, config: JSONOb
|
|
|
101
111
|
"screenOrientation" -> builder.setScreenOrientation(*screenOrientationArrayFromJSON(v as JSONArray))
|
|
102
112
|
"locationTrackingEnabled" -> builder.setLocationTrackingEnabled(v as Boolean)
|
|
103
113
|
"preventScreenRecording" -> builder.setPreventScreenRecording(v as Boolean)
|
|
114
|
+
"usbCamera" -> builder.setUsbCamera(v as Boolean)
|
|
115
|
+
"usbCameraMirrorPreview" -> builder.setUsbCameraMirrorPreview(v as Boolean)
|
|
104
116
|
"attemptsCount" -> builder.setAttemptsCount(v.toInt())
|
|
105
117
|
"recordingProcess" -> builder.setRecordingProcess(RecordingProcess.values()[v.toInt()])
|
|
106
118
|
"livenessType" -> builder.setType(LivenessType.values()[v.toInt()])
|
|
@@ -122,6 +134,8 @@ fun getEnrollmentConfig(input: EnrollmentConfiguration) = mapOf(
|
|
|
122
134
|
"screenOrientation" to generateScreenOrientationArray(input.screenOrientation),
|
|
123
135
|
"locationTrackingEnabled" to input.isLocationTrackingEnabled,
|
|
124
136
|
"preventScreenRecording" to input.doPreventScreenRecording(),
|
|
137
|
+
"usbCamera" to input.isUsbCamera,
|
|
138
|
+
"usbCameraMirrorPreview" to input.isUsbCameraMirrorPreview,
|
|
125
139
|
"attemptsCount" to input.attemptsCount,
|
|
126
140
|
"recordingProcess" to input.recordingProcess.ordinal,
|
|
127
141
|
"livenessType" to input.type.ordinal,
|
|
@@ -144,13 +158,15 @@ fun setVerificationConfig(builder: VerificationConfiguration.Builder, config: JS
|
|
|
144
158
|
"screenOrientation" -> builder.setScreenOrientation(*screenOrientationArrayFromJSON(v as JSONArray))
|
|
145
159
|
"locationTrackingEnabled" -> builder.setLocationTrackingEnabled(v as Boolean)
|
|
146
160
|
"preventScreenRecording" -> builder.setPreventScreenRecording(v as Boolean)
|
|
161
|
+
"usbCamera" -> builder.setUsbCamera(v as Boolean)
|
|
162
|
+
"usbCameraMirrorPreview" -> builder.setUsbCameraMirrorPreview(v as Boolean)
|
|
147
163
|
"attemptsCount" -> builder.setAttemptsCount(v.toInt())
|
|
148
164
|
"recordingProcess" -> builder.setRecordingProcess(RecordingProcess.values()[v.toInt()])
|
|
149
165
|
"livenessType" -> builder.setType(LivenessType.values()[v.toInt()])
|
|
150
166
|
"tag" -> builder.setTag(v as String)
|
|
151
167
|
"skipStep" -> builder.setSkipStep(*livenessSkipStepArrayFromJSON(v as JSONArray))
|
|
152
168
|
"metadata" -> builder.setMetadata(v as JSONObject)
|
|
153
|
-
"personId" -> builder.setPrivateProperty("
|
|
169
|
+
"personId" -> builder.setPrivateProperty("w", v as String)
|
|
154
170
|
"threshold" -> builder.setThreshold(v.toFloat())
|
|
155
171
|
}
|
|
156
172
|
}
|
|
@@ -165,6 +181,8 @@ fun getVerificationConfig(input: VerificationConfiguration) = mapOf(
|
|
|
165
181
|
"screenOrientation" to generateScreenOrientationArray(input.screenOrientation),
|
|
166
182
|
"locationTrackingEnabled" to input.isLocationTrackingEnabled,
|
|
167
183
|
"preventScreenRecording" to input.doPreventScreenRecording(),
|
|
184
|
+
"usbCamera" to input.isUsbCamera,
|
|
185
|
+
"usbCameraMirrorPreview" to input.isUsbCameraMirrorPreview,
|
|
168
186
|
"attemptsCount" to input.attemptsCount,
|
|
169
187
|
"recordingProcess" to input.recordingProcess.ordinal,
|
|
170
188
|
"livenessType" to input.type.ordinal,
|
|
@@ -171,12 +171,12 @@ fun generateScreenOrientationArray(input: Array<ScreenOrientation>) = input.let
|
|
|
171
171
|
// Exception ------------------------------
|
|
172
172
|
|
|
173
173
|
fun faceCaptureExceptionFromJSON(input: JSONObject?) = input?.let {
|
|
174
|
-
FaceCaptureException(FaceCaptureErrorCode.
|
|
174
|
+
FaceCaptureException(FaceCaptureErrorCode.get(it.getInt("code")))
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
fun generateFaceCaptureException(input: FaceCaptureException?) = input?.let {
|
|
178
178
|
mapOf(
|
|
179
|
-
"code" to it.errorCode.
|
|
179
|
+
"code" to it.errorCode.value,
|
|
180
180
|
"message" to it.message
|
|
181
181
|
).toJson()
|
|
182
182
|
}
|
|
@@ -212,14 +212,14 @@ fun generateLicenseException(input: LicenseException?) = input?.let {
|
|
|
212
212
|
|
|
213
213
|
fun livenessExceptionFromJSON(input: JSONObject?) = input?.let {
|
|
214
214
|
LivenessErrorException(
|
|
215
|
-
LivenessErrorCode.
|
|
215
|
+
LivenessErrorCode.get(it.getInt("code")),
|
|
216
216
|
livenessBackendExceptionFromJSON(it.getJSONObjectOrNull("underlyingError"))
|
|
217
217
|
)
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
fun generateLivenessException(input: LivenessErrorException?) = input?.let {
|
|
221
221
|
mapOf(
|
|
222
|
-
"code" to it.errorCode.
|
|
222
|
+
"code" to it.errorCode.value,
|
|
223
223
|
"message" to it.message,
|
|
224
224
|
"underlyingError" to generateLivenessBackendException(it.underlyingException)
|
|
225
225
|
).toJson()
|
|
@@ -668,23 +668,20 @@ fun generateComparedFacesPair(it: MatchFacesComparedFacesPair) = mapOf(
|
|
|
668
668
|
).toJson()
|
|
669
669
|
|
|
670
670
|
fun matchFacesResponseFromJSON(input: JSONObject) = input.let {
|
|
671
|
-
MatchFacesResponse::class.constructor(
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
it.getJSONArrayOrNull("results").toList(::comparedFacesPairFromJSON).toArrayList(),
|
|
679
|
-
it.getStringOrNull("tag"),
|
|
680
|
-
matchFacesExceptionFromJSON(it.getJSONObjectOrNull("error")),
|
|
681
|
-
)
|
|
671
|
+
val result = MatchFacesResponse::class.constructor().instantiate()
|
|
672
|
+
result.setPrivateProperty("detections", it.getJSONArrayOrNull("detections").toList(::matchFacesDetectionFromJSON))
|
|
673
|
+
result.setPrivateProperty("results", it.getJSONArrayOrNull("results").toList(::comparedFacesPairFromJSON))
|
|
674
|
+
result.setPrivateProperty("tag", it.getStringOrNull("tag"))
|
|
675
|
+
result.setPrivateProperty("transactionId", it.getStringOrNull("transactionId"))
|
|
676
|
+
result.setPrivateProperty("exception", matchFacesExceptionFromJSON(it.getJSONObjectOrNull("error")))
|
|
677
|
+
result
|
|
682
678
|
}
|
|
683
679
|
|
|
684
680
|
fun generateMatchFacesResponse(it: MatchFacesResponse) = mapOf(
|
|
685
681
|
"detections" to it.detections.toJson(::generateMatchFacesDetection),
|
|
686
682
|
"results" to it.results.toJson(::generateComparedFacesPair),
|
|
687
683
|
"tag" to it.tag,
|
|
684
|
+
"transactionId" to it.transactionId,
|
|
688
685
|
"error" to generateMatchFacesException(it.exception)
|
|
689
686
|
).toJson()
|
|
690
687
|
|
|
@@ -829,17 +826,20 @@ fun detectFacesResponseFromJSON(input: JSONObject): DetectFacesResponse = input.
|
|
|
829
826
|
DetectFacesResponse::class.constructor(
|
|
830
827
|
String::class,
|
|
831
828
|
List::class,
|
|
832
|
-
DetectFacesErrorException::class
|
|
829
|
+
DetectFacesErrorException::class,
|
|
830
|
+
String::class,
|
|
833
831
|
).instantiate(
|
|
834
832
|
it.getStringOrNull("scenario"),
|
|
835
833
|
it.getJSONArrayOrNull("allDetections").toList(::detectFaceResultFromJSON),
|
|
836
834
|
detectFacesExceptionFromJSON(it.getJSONObjectOrNull("error")),
|
|
835
|
+
it.getStringOrNull("transactionId"),
|
|
837
836
|
)
|
|
838
837
|
}
|
|
839
838
|
|
|
840
839
|
fun generateDetectFacesResponse(it: DetectFacesResponse) = mapOf(
|
|
841
840
|
"detection" to generateDetectFaceResult(it.detection),
|
|
842
841
|
"scenario" to it.scenario,
|
|
842
|
+
"transactionId" to it.transactionId,
|
|
843
843
|
"error" to generateDetectFacesException(it.error),
|
|
844
844
|
"allDetections" to it.allDetections.toJsonNullable(::generateDetectFaceResult)
|
|
845
845
|
).toJson()
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
<string></string>
|
|
32
32
|
<key>NSPhotoLibraryUsageDescription</key>
|
|
33
33
|
<string></string>
|
|
34
|
+
<key>NSPhotoLibraryAddUsageDescription</key>
|
|
35
|
+
<string>Required by @capacitor/camera plugin, not used.</string>
|
|
34
36
|
<key>UILaunchStoryboardName</key>
|
|
35
37
|
<string>LaunchScreen</string>
|
|
36
38
|
<key>UIRequiredDeviceCapabilities</key>
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
228
228
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
229
229
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
230
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
230
|
+
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
|
|
231
231
|
MTL_ENABLE_DEBUG_INFO = YES;
|
|
232
232
|
ONLY_ACTIVE_ARCH = YES;
|
|
233
233
|
SDKROOT = iphoneos;
|
|
@@ -279,7 +279,7 @@
|
|
|
279
279
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
280
280
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
281
281
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
282
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
282
|
+
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
|
|
283
283
|
MTL_ENABLE_DEBUG_INFO = NO;
|
|
284
284
|
SDKROOT = iphoneos;
|
|
285
285
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
CODE_SIGN_STYLE = Automatic;
|
|
296
296
|
CURRENT_PROJECT_VERSION = 1;
|
|
297
297
|
INFOPLIST_FILE = App/Info.plist;
|
|
298
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
298
|
+
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
|
|
299
299
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
|
300
300
|
MARKETING_VERSION = 1.0;
|
|
301
301
|
PRODUCT_BUNDLE_IDENTIFIER = com.regula.example.face.capacitor;
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
CODE_SIGN_STYLE = Automatic;
|
|
316
316
|
CURRENT_PROJECT_VERSION = 1;
|
|
317
317
|
INFOPLIST_FILE = App/Info.plist;
|
|
318
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
318
|
+
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
|
|
319
319
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
|
320
320
|
MARKETING_VERSION = 1.0;
|
|
321
321
|
PRODUCT_BUNDLE_IDENTIFIER = com.regula.example.face.capacitor;
|