@regulaforensics/face-sdk 8.5.1575-rc → 8.5.1577-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.
Files changed (53) hide show
  1. package/Package.swift +1 -1
  2. package/android/build.gradle.kts +1 -1
  3. package/android/cordova.gradle.kts +1 -1
  4. package/android/src/main/kotlin/com/regula/plugin/face/sdk/Config.kt +1 -19
  5. package/android/src/main/kotlin/com/regula/plugin/face/sdk/JSONConstructor.kt +16 -16
  6. package/examples/capacitor/ios/App/App/Info.plist +0 -2
  7. package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +4 -4
  8. package/examples/capacitor/package-lock.json +209 -590
  9. package/examples/capacitor/package.json +3 -8
  10. package/examples/ionic/config.xml +1 -1
  11. package/examples/ionic/package-lock.json +2457 -2105
  12. package/examples/ionic/package.json +3 -20
  13. package/examples/react_native/package-lock.json +927 -571
  14. package/examples/react_native/package.json +3 -10
  15. package/examples/react_native/scripts/withoutMetroServer.js +8 -11
  16. package/ios/Config.swift +29 -21
  17. package/ios/Decoder.swift +21 -25
  18. package/ios/Implementation.swift +3 -3
  19. package/package.json +1 -1
  20. package/plugin.xml +2 -2
  21. package/react-native-face-sdk.podspec +2 -2
  22. package/test/json.tsx +0 -12
  23. package/test/package-lock.json +2 -5
  24. package/test/test.tsx +74 -66
  25. package/www/capacitor/customization/customization_images.js +0 -8
  26. package/www/capacitor/customization/screen_orientation.js +0 -2
  27. package/www/capacitor/detect_faces/detect_faces_response.js +0 -3
  28. package/www/capacitor/face_capture/face_capture_config.js +0 -12
  29. package/www/capacitor/liveness/enrollment_config.js +0 -8
  30. package/www/capacitor/liveness/liveness_config.js +0 -8
  31. package/www/capacitor/liveness/liveness_notification.js +2 -4
  32. package/www/capacitor/liveness/verification_config.js +0 -8
  33. package/www/capacitor/match_faces/match_faces_response.js +0 -3
  34. package/www/cordova.js +2 -56
  35. package/www/react-native/customization/customization_images.js +0 -8
  36. package/www/react-native/customization/screen_orientation.js +0 -2
  37. package/www/react-native/detect_faces/detect_faces_response.js +0 -3
  38. package/www/react-native/face_capture/face_capture_config.js +0 -12
  39. package/www/react-native/liveness/enrollment_config.js +0 -8
  40. package/www/react-native/liveness/liveness_config.js +0 -8
  41. package/www/react-native/liveness/liveness_notification.js +2 -4
  42. package/www/react-native/liveness/verification_config.js +0 -8
  43. package/www/react-native/match_faces/match_faces_response.js +0 -3
  44. package/www/types/customization/customization_images.d.ts +0 -1
  45. package/www/types/customization/screen_orientation.d.ts +0 -4
  46. package/www/types/detect_faces/detect_faces_response.d.ts +0 -3
  47. package/www/types/face_capture/face_capture_config.d.ts +0 -15
  48. package/www/types/liveness/enrollment_config.d.ts +0 -6
  49. package/www/types/liveness/liveness_backend_exception.d.ts +1 -1
  50. package/www/types/liveness/liveness_config.d.ts +0 -8
  51. package/www/types/liveness/liveness_notification.d.ts +0 -2
  52. package/www/types/liveness/verification_config.d.ts +0 -8
  53. package/www/types/match_faces/match_faces_response.d.ts +0 -3
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.5291-rc"
13
+ exact: "8.5.5293-rc"
14
14
  )
15
15
  ],
16
16
  targets: [
@@ -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.5.5703") {
34
+ implementation("com.regula.face:api:8.5.5704") {
35
35
  isTransitive = true
36
36
  }
37
37
  }
@@ -11,7 +11,7 @@ repositories {
11
11
 
12
12
  dependencies {
13
13
  //noinspection GradleDependency
14
- add("implementation", "com.regula.face:api:8.5.5703") {
14
+ add("implementation", "com.regula.face:api:8.5.5704") {
15
15
  isTransitive = true
16
16
  }
17
17
  }
@@ -28,9 +28,6 @@ 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)
34
31
  "cameraPositionAndroid" -> builder.setCameraId(v.toInt())
35
32
  "screenOrientation" -> builder.setScreenOrientation(*screenOrientationArrayFromJSON(v as JSONArray))
36
33
  "timeout" -> builder.setTimeout(v.toFloat())
@@ -47,9 +44,6 @@ fun getFaceCaptureConfig(input: FaceCaptureConfiguration) = mapOf(
47
44
  "detectOcclusion" to input.isDetectOcclusion,
48
45
  "showFaceAnimation" to input.isShowFaceAnimation,
49
46
  "preventScreenRecording" to input.doPreventScreenRecording(),
50
- "usbCamera" to input.isUsbCamera,
51
- "usbCameraMirrorPreview" to input.isUsbCameraMirrorPreview,
52
- "rejectMultipleFaces" to input.isRejectMultipleFaces,
53
47
  "cameraPositionAndroid" to input.cameraId,
54
48
  "screenOrientation" to generateScreenOrientationArray(input.screenOrientation),
55
49
  "timeout" to input.timeout,
@@ -68,8 +62,6 @@ fun setLivenessConfig(builder: LivenessConfiguration.Builder, config: JSONObject
68
62
  "screenOrientation" -> builder.setScreenOrientation(*screenOrientationArrayFromJSON(v as JSONArray))
69
63
  "locationTrackingEnabled" -> builder.setLocationTrackingEnabled(v as Boolean)
70
64
  "preventScreenRecording" -> builder.setPreventScreenRecording(v as Boolean)
71
- "usbCamera" -> builder.setUsbCamera(v as Boolean)
72
- "usbCameraMirrorPreview" -> builder.setUsbCameraMirrorPreview(v as Boolean)
73
65
  "attemptsCount" -> builder.setAttemptsCount(v.toInt())
74
66
  "recordingProcess" -> builder.setRecordingProcess(RecordingProcess.values()[v.toInt()])
75
67
  "livenessType" -> builder.setType(LivenessType.values()[v.toInt()])
@@ -89,8 +81,6 @@ fun getLivenessConfig(input: LivenessConfiguration) = mapOf(
89
81
  "screenOrientation" to generateScreenOrientationArray(input.screenOrientation),
90
82
  "locationTrackingEnabled" to input.isLocationTrackingEnabled,
91
83
  "preventScreenRecording" to input.doPreventScreenRecording(),
92
- "usbCamera" to input.isUsbCamera,
93
- "usbCameraMirrorPreview" to input.isUsbCameraMirrorPreview,
94
84
  "attemptsCount" to input.attemptsCount,
95
85
  "recordingProcess" to input.recordingProcess.ordinal,
96
86
  "livenessType" to input.type.ordinal,
@@ -111,8 +101,6 @@ fun setEnrollmentConfig(builder: EnrollmentConfiguration.Builder, config: JSONOb
111
101
  "screenOrientation" -> builder.setScreenOrientation(*screenOrientationArrayFromJSON(v as JSONArray))
112
102
  "locationTrackingEnabled" -> builder.setLocationTrackingEnabled(v as Boolean)
113
103
  "preventScreenRecording" -> builder.setPreventScreenRecording(v as Boolean)
114
- "usbCamera" -> builder.setUsbCamera(v as Boolean)
115
- "usbCameraMirrorPreview" -> builder.setUsbCameraMirrorPreview(v as Boolean)
116
104
  "attemptsCount" -> builder.setAttemptsCount(v.toInt())
117
105
  "recordingProcess" -> builder.setRecordingProcess(RecordingProcess.values()[v.toInt()])
118
106
  "livenessType" -> builder.setType(LivenessType.values()[v.toInt()])
@@ -134,8 +122,6 @@ fun getEnrollmentConfig(input: EnrollmentConfiguration) = mapOf(
134
122
  "screenOrientation" to generateScreenOrientationArray(input.screenOrientation),
135
123
  "locationTrackingEnabled" to input.isLocationTrackingEnabled,
136
124
  "preventScreenRecording" to input.doPreventScreenRecording(),
137
- "usbCamera" to input.isUsbCamera,
138
- "usbCameraMirrorPreview" to input.isUsbCameraMirrorPreview,
139
125
  "attemptsCount" to input.attemptsCount,
140
126
  "recordingProcess" to input.recordingProcess.ordinal,
141
127
  "livenessType" to input.type.ordinal,
@@ -158,15 +144,13 @@ fun setVerificationConfig(builder: VerificationConfiguration.Builder, config: JS
158
144
  "screenOrientation" -> builder.setScreenOrientation(*screenOrientationArrayFromJSON(v as JSONArray))
159
145
  "locationTrackingEnabled" -> builder.setLocationTrackingEnabled(v as Boolean)
160
146
  "preventScreenRecording" -> builder.setPreventScreenRecording(v as Boolean)
161
- "usbCamera" -> builder.setUsbCamera(v as Boolean)
162
- "usbCameraMirrorPreview" -> builder.setUsbCameraMirrorPreview(v as Boolean)
163
147
  "attemptsCount" -> builder.setAttemptsCount(v.toInt())
164
148
  "recordingProcess" -> builder.setRecordingProcess(RecordingProcess.values()[v.toInt()])
165
149
  "livenessType" -> builder.setType(LivenessType.values()[v.toInt()])
166
150
  "tag" -> builder.setTag(v as String)
167
151
  "skipStep" -> builder.setSkipStep(*livenessSkipStepArrayFromJSON(v as JSONArray))
168
152
  "metadata" -> builder.setMetadata(v as JSONObject)
169
- "personId" -> builder.setPrivateProperty("w", v as String)
153
+ "personId" -> builder.setPrivateProperty("u", v as String)
170
154
  "threshold" -> builder.setThreshold(v.toFloat())
171
155
  }
172
156
  }
@@ -181,8 +165,6 @@ fun getVerificationConfig(input: VerificationConfiguration) = mapOf(
181
165
  "screenOrientation" to generateScreenOrientationArray(input.screenOrientation),
182
166
  "locationTrackingEnabled" to input.isLocationTrackingEnabled,
183
167
  "preventScreenRecording" to input.doPreventScreenRecording(),
184
- "usbCamera" to input.isUsbCamera,
185
- "usbCameraMirrorPreview" to input.isUsbCameraMirrorPreview,
186
168
  "attemptsCount" to input.attemptsCount,
187
169
  "recordingProcess" to input.recordingProcess.ordinal,
188
170
  "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.get(it.getInt("code")))
174
+ FaceCaptureException(FaceCaptureErrorCode.values()[it.getInt("code")])
175
175
  }
176
176
 
177
177
  fun generateFaceCaptureException(input: FaceCaptureException?) = input?.let {
178
178
  mapOf(
179
- "code" to it.errorCode.value,
179
+ "code" to it.errorCode.ordinal,
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.get(it.getInt("code")),
215
+ LivenessErrorCode.values()[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.value,
222
+ "code" to it.errorCode.ordinal,
223
223
  "message" to it.message,
224
224
  "underlyingError" to generateLivenessBackendException(it.underlyingException)
225
225
  ).toJson()
@@ -668,20 +668,23 @@ fun generateComparedFacesPair(it: MatchFacesComparedFacesPair) = mapOf(
668
668
  ).toJson()
669
669
 
670
670
  fun matchFacesResponseFromJSON(input: JSONObject) = input.let {
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
671
+ MatchFacesResponse::class.constructor(
672
+ ArrayList::class,
673
+ ArrayList::class,
674
+ String::class,
675
+ MatchFacesException::class
676
+ ).instantiate(
677
+ it.getJSONArrayOrNull("detections").toList(::matchFacesDetectionFromJSON).toArrayList(),
678
+ it.getJSONArrayOrNull("results").toList(::comparedFacesPairFromJSON).toArrayList(),
679
+ it.getStringOrNull("tag"),
680
+ matchFacesExceptionFromJSON(it.getJSONObjectOrNull("error")),
681
+ )
678
682
  }
679
683
 
680
684
  fun generateMatchFacesResponse(it: MatchFacesResponse) = mapOf(
681
685
  "detections" to it.detections.toJson(::generateMatchFacesDetection),
682
686
  "results" to it.results.toJson(::generateComparedFacesPair),
683
687
  "tag" to it.tag,
684
- "transactionId" to it.transactionId,
685
688
  "error" to generateMatchFacesException(it.exception)
686
689
  ).toJson()
687
690
 
@@ -826,20 +829,17 @@ fun detectFacesResponseFromJSON(input: JSONObject): DetectFacesResponse = input.
826
829
  DetectFacesResponse::class.constructor(
827
830
  String::class,
828
831
  List::class,
829
- DetectFacesErrorException::class,
830
- String::class,
832
+ DetectFacesErrorException::class
831
833
  ).instantiate(
832
834
  it.getStringOrNull("scenario"),
833
835
  it.getJSONArrayOrNull("allDetections").toList(::detectFaceResultFromJSON),
834
836
  detectFacesExceptionFromJSON(it.getJSONObjectOrNull("error")),
835
- it.getStringOrNull("transactionId"),
836
837
  )
837
838
  }
838
839
 
839
840
  fun generateDetectFacesResponse(it: DetectFacesResponse) = mapOf(
840
841
  "detection" to generateDetectFaceResult(it.detection),
841
842
  "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,8 +31,6 @@
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>
36
34
  <key>UILaunchStoryboardName</key>
37
35
  <string>LaunchScreen</string>
38
36
  <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 = 17.6;
230
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
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 = 17.6;
282
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
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 = 17.6;
298
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
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 = 17.6;
318
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
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;