@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.
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 +19 -1
  5. package/android/src/main/kotlin/com/regula/plugin/face/sdk/JSONConstructor.kt +16 -16
  6. package/examples/capacitor/ios/App/App/Info.plist +2 -0
  7. package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +4 -4
  8. package/examples/capacitor/package-lock.json +590 -209
  9. package/examples/capacitor/package.json +8 -3
  10. package/examples/ionic/config.xml +1 -1
  11. package/examples/ionic/package-lock.json +2136 -2488
  12. package/examples/ionic/package.json +20 -3
  13. package/examples/react_native/package-lock.json +571 -927
  14. package/examples/react_native/package.json +10 -3
  15. package/examples/react_native/scripts/withoutMetroServer.js +11 -8
  16. package/ios/Config.swift +21 -29
  17. package/ios/Decoder.swift +25 -21
  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 +12 -0
  23. package/test/package-lock.json +5 -2
  24. package/test/test.tsx +66 -74
  25. package/www/capacitor/customization/customization_images.js +8 -0
  26. package/www/capacitor/customization/screen_orientation.js +2 -0
  27. package/www/capacitor/detect_faces/detect_faces_response.js +3 -0
  28. package/www/capacitor/face_capture/face_capture_config.js +12 -0
  29. package/www/capacitor/liveness/enrollment_config.js +8 -0
  30. package/www/capacitor/liveness/liveness_config.js +8 -0
  31. package/www/capacitor/liveness/liveness_notification.js +4 -2
  32. package/www/capacitor/liveness/verification_config.js +8 -0
  33. package/www/capacitor/match_faces/match_faces_response.js +3 -0
  34. package/www/cordova.js +56 -2
  35. package/www/react-native/customization/customization_images.js +8 -0
  36. package/www/react-native/customization/screen_orientation.js +2 -0
  37. package/www/react-native/detect_faces/detect_faces_response.js +3 -0
  38. package/www/react-native/face_capture/face_capture_config.js +12 -0
  39. package/www/react-native/liveness/enrollment_config.js +8 -0
  40. package/www/react-native/liveness/liveness_config.js +8 -0
  41. package/www/react-native/liveness/liveness_notification.js +4 -2
  42. package/www/react-native/liveness/verification_config.js +8 -0
  43. package/www/react-native/match_faces/match_faces_response.js +3 -0
  44. package/www/types/customization/customization_images.d.ts +1 -0
  45. package/www/types/customization/screen_orientation.d.ts +4 -0
  46. package/www/types/detect_faces/detect_faces_response.d.ts +3 -0
  47. package/www/types/face_capture/face_capture_config.d.ts +15 -0
  48. package/www/types/liveness/enrollment_config.d.ts +6 -0
  49. package/www/types/liveness/liveness_backend_exception.d.ts +1 -1
  50. package/www/types/liveness/liveness_config.d.ts +8 -0
  51. package/www/types/liveness/liveness_notification.d.ts +2 -0
  52. package/www/types/liveness/verification_config.d.ts +8 -0
  53. package/www/types/match_faces/match_faces_response.d.ts +3 -0
@@ -7,9 +7,9 @@
7
7
  "android": "scripts/android.sh"
8
8
  },
9
9
  "dependencies": {
10
- "@regulaforensics/face-sdk": "8.5.1574-nightly",
11
- "@regulaforensics/face-core-basic": "8.5.931-nightly",
12
- "react-native": "0.88.0",
10
+ "@regulaforensics/face-sdk": "8.5.1575-rc",
11
+ "@regulaforensics/face-core-basic": "8.4.884",
12
+ "react-native": "0.88.1",
13
13
  "react-native-fs": "^2.20.0",
14
14
  "react-native-image-picker": "^8.3.0",
15
15
  "react-native-webview": "^14.0.1",
@@ -24,6 +24,13 @@
24
24
  "overrides": {
25
25
  "xcode": {
26
26
  "uuid": "^11.1.1"
27
+ },
28
+ "glob@^13.0.0": "^14.0.3",
29
+ "minimatch@^10.0.0": "^11.0.4",
30
+ "@regulaforensics/face-sdk": {
31
+ "@expo/config-plugins": {
32
+ "glob": "^14.0.3"
33
+ }
27
34
  }
28
35
  }
29
36
  }
@@ -1,15 +1,18 @@
1
1
  const { withAppDelegate, withAppBuildGradle, withMainApplication, withXcodeProject } = require('expo/config-plugins')
2
2
 
3
- function replaceRequired(contents, pattern, replacement, description) {
4
- if (!pattern.test(contents)) throw new Error(`Standalone build: cannot find ${description}`)
5
- return contents.replace(pattern, replacement)
3
+ function replaceRequired(contents, search, replacement, description, endMarker) {
4
+ const start = contents.indexOf(search)
5
+ if (start === -1) throw new Error(`Standalone build: cannot find ${description}`)
6
+ const end = endMarker ? contents.indexOf(endMarker, start + search.length) : start + search.length
7
+ if (end === -1) throw new Error(`Standalone build: cannot find end of ${description}`)
8
+ return contents.slice(0, start) + replacement + contents.slice(end + (endMarker ? endMarker.length : 0))
6
9
  }
7
10
 
8
11
  module.exports = config => {
9
12
  config = withAppDelegate(config, config => {
10
13
  let contents = config.modResults.contents
11
14
  if (!contents.includes('// Standalone demo: no development menu.')) {
12
- contents = replaceRequired(contents, /let factory = ExpoReactNativeFactory\(delegate: delegate\)/,
15
+ contents = replaceRequired(contents, 'let factory = ExpoReactNativeFactory(delegate: delegate)',
13
16
  `let factory = ExpoReactNativeFactory(delegate: delegate)
14
17
  // Standalone demo: no development menu.
15
18
  #if DEBUG
@@ -18,10 +21,10 @@ module.exports = config => {
18
21
  #endif`, 'React Native factory')
19
22
  }
20
23
  contents = replaceRequired(contents,
21
- /override func bundleURL\(\) -> URL\? \{[\s\S]*?\n \}/,
24
+ 'override func bundleURL() -> URL? {',
22
25
  `override func bundleURL() -> URL? {
23
26
  return Bundle.main.url(forResource: "main", withExtension: "jsbundle")
24
- }`, 'bundleURL method')
27
+ }`, 'bundleURL method', '\n }')
25
28
  config.modResults.contents = contents
26
29
  return config
27
30
  })
@@ -56,14 +59,14 @@ cp -R images "$DEST/web/"
56
59
  config = withMainApplication(config, config => {
57
60
  if (!config.modResults.contents.includes('useDevSupport = false')) {
58
61
  config.modResults.contents = replaceRequired(config.modResults.contents,
59
- /context = applicationContext,/, 'context = applicationContext,\n useDevSupport = false,', 'Android ReactHost context')
62
+ 'context = applicationContext,', 'context = applicationContext,\n useDevSupport = false,', 'Android ReactHost context')
60
63
  }
61
64
  return config
62
65
  })
63
66
 
64
67
  config = withAppBuildGradle(config, config => {
65
68
  if (!config.modResults.contents.includes('// Standalone demo: embed JS in Debug.')) {
66
- config.modResults.contents = replaceRequired(config.modResults.contents, /react \{/,
69
+ config.modResults.contents = replaceRequired(config.modResults.contents, 'react {',
67
70
  `react {
68
71
  // Standalone demo: embed JS in Debug.
69
72
  debuggableVariants = []
package/ios/Config.swift CHANGED
@@ -11,7 +11,7 @@ func setCustomization(_ it: [String: [String: Any]]) {
11
11
  for (k, v) in value {
12
12
  switch key {
13
13
  case("colors"): dict[Int(k)!] = UIColor.decode(v)
14
- case("fonts"): dict[CustomizationFont.fromDartKey(k)] = UIFont.decode(v)
14
+ case("fonts"): dict[CustomizationFont.fromDartKey(k) as Any] = UIFont.decode(v)
15
15
  case("images"): dict[k] = UIImage.decode(v)
16
16
  default: break
17
17
  }
@@ -51,6 +51,7 @@ public extension FaceCaptureConfiguration {
51
51
  case("detectOcclusion"): builder.detectOcclusion = v as! Bool
52
52
  case("showFaceAnimation"): builder.showFaceAnimation = v as! Bool
53
53
  case("preventScreenRecording"): builder.isPreventScreenRecordingEnable = v as! Bool
54
+ case("rejectMultipleFaces"): builder.rejectMultipleFaces = v as! Bool
54
55
  case("cameraPositionIOS"): builder.cameraPosition = CameraPosition(rawValue: v as! Int)!
55
56
  case("screenOrientation"): builder.screenOrientation = RFSScreenOrientation.decode(v)
56
57
  case("timeout"): builder.timeoutInterval = v as? NSNumber
@@ -70,6 +71,7 @@ public extension FaceCaptureConfiguration {
70
71
  "detectOcclusion": self.detectOcclusion,
71
72
  "showFaceAnimation": self.showFaceAnimation,
72
73
  "preventScreenRecording": self.isPreventScreenRecordingEnable,
74
+ "rejectMultipleFaces": self.rejectMultipleFaces,
73
75
  "cameraPositionIOS": self.cameraPosition.rawValue,
74
76
  "screenOrientation": self.screenOrientation.encode(),
75
77
  "timeout": self.timeoutInterval,
@@ -195,7 +197,7 @@ public extension LivenessConfiguration {
195
197
  case("tag"): builder.tag = v as? String
196
198
  case("skipStep"): builder.stepSkippingMask = RFSLivenessStepSkip.decode(v)
197
199
  case("metadata"): builder.metadata = v as! [String: Any]
198
- case("personId"): builder.personId = v as! String
200
+ case("personId"): builder.personId = v as? String
199
201
  case("threshold"): builder.threshold = v as? NSNumber
200
202
  default: break
201
203
  }
@@ -252,44 +254,34 @@ extension UIColor {
252
254
  // Create from a hex integer; supports #RGB, #ARGB, #RRGGBB, #AARRGGBB semantics
253
255
  static func decode(_ it: Any?) -> Self? {
254
256
  guard let it = it as? Int else { return nil }
255
- // Build hex string manually to preserve leading zeros when derived from integers
256
- var value = UInt32(truncatingIfNeeded: it)
257
- let digits = Array("0123456789ABCDEF")
258
- var hex = ""
259
- while value > 0 {
260
- let d = Int(value % 16)
261
- hex.insert(digits[d], at: hex.startIndex)
262
- value /= 16
263
- }
264
- if hex.isEmpty { hex = "0" }
257
+ var hex = String(UInt32(truncatingIfNeeded: it), radix: 16, uppercase: true)
265
258
  // If length is 5 or 7, pad a leading 0 to restore a lost leading nibble
266
259
  if hex.count == 5 || hex.count == 7 { hex = "0" + hex }
267
- let s = hex.uppercased()
268
260
 
269
261
  let a, r, g, b: CGFloat
270
- switch s.count {
262
+ switch hex.count {
271
263
  case 3: // RGB
272
264
  a = 1.0
273
- r = Self.component(from: s, start: 0, length: 1)
274
- g = Self.component(from: s, start: 1, length: 1)
275
- b = Self.component(from: s, start: 2, length: 1)
265
+ r = Self.component(from: hex, start: 0, length: 1)
266
+ g = Self.component(from: hex, start: 1, length: 1)
267
+ b = Self.component(from: hex, start: 2, length: 1)
276
268
  case 4: // ARGB
277
- a = Self.component(from: s, start: 0, length: 1)
278
- r = Self.component(from: s, start: 1, length: 1)
279
- g = Self.component(from: s, start: 2, length: 1)
280
- b = Self.component(from: s, start: 3, length: 1)
269
+ a = Self.component(from: hex, start: 0, length: 1)
270
+ r = Self.component(from: hex, start: 1, length: 1)
271
+ g = Self.component(from: hex, start: 2, length: 1)
272
+ b = Self.component(from: hex, start: 3, length: 1)
281
273
  case 6: // RRGGBB
282
274
  a = 1.0
283
- r = Self.component(from: s, start: 0, length: 2)
284
- g = Self.component(from: s, start: 2, length: 2)
285
- b = Self.component(from: s, start: 4, length: 2)
275
+ r = Self.component(from: hex, start: 0, length: 2)
276
+ g = Self.component(from: hex, start: 2, length: 2)
277
+ b = Self.component(from: hex, start: 4, length: 2)
286
278
  case 8: // AARRGGBB
287
- a = Self.component(from: s, start: 0, length: 2)
288
- r = Self.component(from: s, start: 2, length: 2)
289
- g = Self.component(from: s, start: 4, length: 2)
290
- b = Self.component(from: s, start: 6, length: 2)
279
+ a = Self.component(from: hex, start: 0, length: 2)
280
+ r = Self.component(from: hex, start: 2, length: 2)
281
+ g = Self.component(from: hex, start: 4, length: 2)
282
+ b = Self.component(from: hex, start: 6, length: 2)
291
283
  default:
292
- assertionFailure("Invalid color value: #\(s). Expected #RGB, #ARGB, #RRGGBB, or #AARRGGBB")
284
+ assertionFailure("Invalid color value: #\(hex). Expected #RGB, #ARGB, #RRGGBB, or #AARRGGBB")
293
285
  return nil
294
286
  }
295
287
  return Self(red: r, green: g, blue: b, alpha: a)
package/ios/Decoder.swift CHANGED
@@ -150,7 +150,7 @@ public extension EnrollmentResponse {
150
150
  let result = EnrollmentResponse.emptyInit() as EnrollmentResponse
151
151
  result.setValue(it["enrolled"] as Any?, forKey: "enrolled")
152
152
  result.setValue(PersonDatabase.Person.decode(it["person"] as Any?), forKey: "person")
153
- result.setValue((it["searchPersons"] as? [[String: Any]])?.compactMap { PersonDatabase.SearchPerson.decode2($0) }, forKey: "searchPersons")
153
+ result.setValue((it["searchPersons"] as? [[String: Any]])?.map(PersonDatabase.SearchPerson.decode2), forKey: "searchPersons")
154
154
  return result
155
155
  }
156
156
  func encode() -> [String: Any?] {
@@ -270,7 +270,7 @@ public extension OutputImageParams {
270
270
  public extension MatchFacesRequest {
271
271
  static func decode(_ it: Any?) -> Self {
272
272
  let it = it as! [String: Any]
273
- let result = Self(images: (it["images"] as! [[String: Any?]]).compactMap { MatchFacesImage.decode($0) })
273
+ let result = Self(images: (it["images"] as! [[String: Any?]]).compactMap(MatchFacesImage.decode))
274
274
  result.metadata = it["metadata"] as? [String: Any]
275
275
  result.tag = it["tag"] as? String
276
276
  result.outputImageParams = OutputImageParams.decode(it["outputImageParams"])
@@ -325,7 +325,7 @@ public extension MatchFacesDetectionFace {
325
325
  static func decode(_ it: Any?) -> Self? {
326
326
  guard let it = it as? [String: Any] else { return nil }
327
327
  return Self(faceIndex: it["faceIndex"] as! NSNumber,
328
- landmarks: (it["landmarks"] as! [[String: Any?]]).compactMap { Point.decode($0) },
328
+ landmarks: (it["landmarks"] as! [[String: Any?]]).map(Point.decode),
329
329
  face: CGRect.decode(it["faceRect"]),
330
330
  rotationAngle: it["rotationAngle"] as? NSNumber,
331
331
  thumbnailImage: UIImage.decode(it["thumbnailImage"]),
@@ -355,7 +355,7 @@ public extension MatchFacesDetection {
355
355
  alloc, sel,
356
356
  it["imageIndex"],
357
357
  MatchFacesImage.decode(it["image"]),
358
- (it["faces"] as? [Any])?.map { MatchFacesDetectionFace.decode($0) },
358
+ (it["faces"] as? [Any])?.map(MatchFacesDetectionFace.decode),
359
359
  nil
360
360
  )})
361
361
  }
@@ -411,13 +411,14 @@ public extension MatchFacesResponse {
411
411
  static func decode(_ it: Any?) -> MatchFacesResponse {
412
412
  let it = it as! [String: Any]
413
413
  let alloc = MatchFacesResponse.allocate()
414
- let sel = "initWithResults:detections:error:".selector()
414
+ let sel = "initWithResults:detections:transactionId:error:".selector()
415
415
  let result = privateInit(alloc, sel, (@convention(c)(
416
416
  AnyObject, Selector,
417
- Any?, Any?, Any?) -> Unmanaged<AnyObject>?).self, { f in f(
417
+ Any?, Any?, Any?, Any?) -> Unmanaged<AnyObject>?).self, { f in f(
418
418
  alloc, sel,
419
- (it["results"] as? [Any])?.map { MatchFacesComparedFacesPair.decode($0) },
420
- (it["detections"] as? [Any])?.map { MatchFacesDetection.decode($0) },
419
+ (it["results"] as? [Any])?.map(MatchFacesComparedFacesPair.decode),
420
+ (it["detections"] as? [Any])?.map(MatchFacesDetection.decode),
421
+ it["transactionId"],
421
422
  nil
422
423
  )}) as MatchFacesResponse
423
424
  result.setValue(it["tag"] as? String, forKey: "tag")
@@ -429,6 +430,7 @@ public extension MatchFacesResponse {
429
430
  "detections": self.detections.map { $0.encode() },
430
431
  "error": self.error?.encode(),
431
432
  "tag": self.tag,
433
+ "transactionId": self.transactionId,
432
434
  ]
433
435
  }
434
436
  }
@@ -553,7 +555,7 @@ public extension DetectFacesConfiguration {
553
555
  static func decode(_ it: Any?) -> Self {
554
556
  let it = it as! [String: Any]
555
557
  let result = Self()
556
- result.customQuality = (it["customQuality"] as? [[String: Any]])?.compactMap { ImageQualityCharacteristic.decode($0) }
558
+ result.customQuality = (it["customQuality"] as? [[String: Any]])?.map(ImageQualityCharacteristic.decode)
557
559
  result.outputImageParams = OutputImageParams.decode(it["outputImageParams"])
558
560
  result.onlyCentralFace = it["onlyCentralFace"] as? Bool ?? false
559
561
  result.attributes = (it["attributes"] as? [String])?.compactMap { DetectFacesAttribute(rawValue: $0) }
@@ -664,11 +666,11 @@ public extension DetectFaceResult {
664
666
  Any, Selector,
665
667
  Any?, Any?, Any?, CGRect, Any?, CGRect) -> Unmanaged<AnyObject>?).self, { f in f(
666
668
  alloc, sel,
667
- (it["quality"] as? [Any])?.map { ImageQualityResult.decode($0) },
668
- (it["attributes"] as? [Any])?.map{ DetectFacesAttributeResult.decode($0) },
669
+ (it["quality"] as? [Any])?.map(ImageQualityResult.decode),
670
+ (it["attributes"] as? [Any])?.map(DetectFacesAttributeResult.decode),
669
671
  it["crop"],
670
672
  CGRect.decode(it["faceRect"]),
671
- (it["landmarks"] as? [Any])?.map{ Point.decode($0) },
673
+ (it["landmarks"] as? [Any])?.map(Point.decode),
672
674
  CGRect.decode(it["originalRect"])
673
675
  )})
674
676
  }
@@ -689,13 +691,14 @@ public extension DetectFacesResponse {
689
691
  static func decode(_ it: Any?) -> Self {
690
692
  let it = it as! [String: Any]
691
693
  let alloc = DetectFacesResponse.allocate()
692
- let sel = "initWithDetections:scenario:error:".selector()
694
+ let sel = "initWithDetections:scenario:transactionId:error:".selector()
693
695
  return privateInit(alloc, sel, (@convention(c)(
694
696
  Any, Selector,
695
- Any?, Any?, Any?) -> Unmanaged<AnyObject>?).self, { f in f(
697
+ Any?, Any?, Any?, Any?) -> Unmanaged<AnyObject>?).self, { f in f(
696
698
  alloc, sel,
697
- (it["allDetections"] as? [Any])?.map { DetectFaceResult.decode($0) },
699
+ (it["allDetections"] as? [Any])?.map(DetectFaceResult.decode),
698
700
  it["scenario"],
701
+ it["transactionId"],
699
702
  nil
700
703
  )})
701
704
  }
@@ -705,6 +708,7 @@ public extension DetectFacesResponse {
705
708
  "error": self.error?.encode(),
706
709
  "allDetections": self.allDetections?.map { $0.encode() },
707
710
  "scenario": self.scenario,
711
+ "transactionId": self.transactionId,
708
712
  ]
709
713
  }
710
714
  }
@@ -742,10 +746,10 @@ public extension DBPageResponse<PersonDatabase.Person> {
742
746
  func encode() -> [String: Any?] { return encodeDBPageResponse(self, self.items?.compactMap{ $0.encode() }) }
743
747
  }
744
748
  public extension DBPageResponse<PersonDatabase.PersonImage> {
745
- func encode() -> [String: Any?] { return encodeDBPageResponse(self, self.items?.compactMap{ $0.encode() }) }
749
+ func encode() -> [String: Any?] { return encodeDBPageResponse(self, self.items?.map { $0.encode() }) }
746
750
  }
747
751
  public extension DBPageResponse<PersonDatabase.PersonGroup> {
748
- func encode() -> [String: Any?] { return encodeDBPageResponse(self, self.items?.compactMap{ $0.encode() }) }
752
+ func encode() -> [String: Any?] { return encodeDBPageResponse(self, self.items?.map { $0.encode() }) }
749
753
  }
750
754
 
751
755
  public extension Date {
@@ -920,14 +924,14 @@ public extension PersonDatabase.SearchPersonDetection {
920
924
  CGRect, Any?, Any?, Any?) -> Unmanaged<AnyObject>?).self, { f in f(
921
925
  alloc, sel,
922
926
  CGRect.decode(it["rect"]),
923
- (it["landmarks"] as? [Any])?.map { Point.decode($0) },
927
+ (it["landmarks"] as? [Any])?.map(Point.decode),
924
928
  UIImage.decode(it["crop"]),
925
929
  it["rotationAngle"]
926
930
  )})
927
931
  }
928
932
  func encode() -> [String: Any?] {
929
933
  return [
930
- "landmarks": self.landmarks.compactMap({ $0.encode() }),
934
+ "landmarks": self.landmarks.map { $0.encode() },
931
935
  "rect": self.rect.encode(),
932
936
  "crop": self.crop?.encode(),
933
937
  "rotationAngle": self.rotationAngle,
@@ -973,7 +977,7 @@ public extension PersonDatabase.SearchPerson {
973
977
  result.setValue(it["groups"] as Any?, forKey: "groups")
974
978
  result.setValue(it["id"] as Any?, forKey: "itemId")
975
979
  result.setValue((it["metadata"] as Any?) ?? NSNull(), forKey: "mutableMetadata")
976
- result.setValue((it["images"] as? [Any])?.map { PersonDatabase.SearchPersonImage.decode2($0) }, forKey: "images")
980
+ result.setValue((it["images"] as? [Any])?.map(PersonDatabase.SearchPersonImage.decode2), forKey: "images")
977
981
  result.setValue(PersonDatabase.SearchPersonDetection.decode(it["detection"]), forKey: "detection")
978
982
  result.setValue(it["externalId"] as Any?, forKey: "externalId")
979
983
  result.setValue(Date.decode(it["expireAt"]), forKey: "expireAt")
@@ -983,7 +987,7 @@ public extension PersonDatabase.SearchPerson {
983
987
  func encode2() -> [String: Any?] {
984
988
  return [
985
989
  "detection": self.detection.encode(),
986
- "images": self.images.compactMap({ $0.encode2() }),
990
+ "images": self.images.map { $0.encode2() },
987
991
  "createdAt": self.createdAt?.encode(),
988
992
  "updatedAt": self.updatedAt?.encode(),
989
993
  "name": self.name,
@@ -83,7 +83,7 @@ func methodCall(_ method: String, _ callback: @escaping Callback) {
83
83
  configuration: MatchFacesConfiguration.decode(argsNullable(0)),
84
84
  completion: { callback($0.encode()) })
85
85
  case("splitComparedFaces"): callback(MatchFacesSimilarityThresholdSplit(
86
- pairs: (args(0) as [[String: Any?]]).compactMap { MatchFacesComparedFacesPair.decode($0) },
86
+ pairs: (args(0) as [[String: Any?]]).map(MatchFacesComparedFacesPair.decode),
87
87
  bySimilarityThreshold: args(1)).encode())
88
88
  case("detectFaces"): face.detectFaces(
89
89
  by: DetectFacesRequest.decode(args(0)),
@@ -160,12 +160,12 @@ func methodCall(_ method: String, _ callback: @escaping Callback) {
160
160
  completion: { callback($0.encode()) })
161
161
  case("searchPerson"): db.searchPerson(
162
162
  searchRequest: PersonDatabase.SearchPersonRequest.decode(args(0)),
163
- completion: { callback(encodeDBItemResponse($0.results?.compactMap{ $0.encode2() }, $0.error)) })
163
+ completion: { callback(encodeDBItemResponse($0.results?.map { $0.encode2() }, $0.error)) })
164
164
  default: break
165
165
  }
166
166
  }
167
167
 
168
- // MARK: - Implementation
168
+ // MARK: - Delegates
169
169
 
170
170
  var headers: [String: String]?
171
171
  let headersDelegate = IURLRequestInterceptingDelegate()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/face-sdk",
3
- "version": "8.5.1574-nightly",
3
+ "version": "8.5.1575-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.5.1574-nightly" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/face-sdk" version="8.5.1575-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="FaceSDKNightly" spec="8.5.5288" nospm="true" />
30
+ <pod name="FaceSDKStage" spec="8.5.5291" nospm="true" />
31
31
  </pods>
32
32
  </podspec>
33
33
  </platform>
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'react-native-face-sdk'
3
- s.version = '8.5.1574-nightly'
3
+ s.version = '8.5.1575-rc'
4
4
  s.summary = 'Regula React Native plugin.'
5
5
  s.license = 'commercial'
6
6
  s.authors = { 'RegulaForensics' => 'support@regulaforensics.com' }
@@ -9,6 +9,6 @@ Pod::Spec.new do |s|
9
9
  s.ios.deployment_target = '15.0'
10
10
  s.source_files = [ 'ios/*.swift', 'ios/RN*.m' ]
11
11
  s.exclude_files = [ 'ios/CDVFaceSDK.swift' ]
12
- s.dependency 'FaceSDKNightly', '8.5.5288'
12
+ s.dependency 'FaceSDKStage', '8.5.5291'
13
13
  s.dependency 'React'
14
14
  end
package/test/json.tsx CHANGED
@@ -68,6 +68,7 @@ export var customizationImages = {
68
68
  "retryScreenHintChangeBackground": img1,
69
69
  "retryScreenHintFaceOcclusions": img2,
70
70
  "retryScreenHintCovering": img3,
71
+ "retryScreenHintRejectMultipleFaces": img2,
71
72
  "processingScreenCloseButton": img1,
72
73
  "successScreenImage": img2,
73
74
  };
@@ -159,6 +160,7 @@ export var detectFacesResponse = {
159
160
  "detection": detectFaceResult,
160
161
  "allDetections": [detectFaceResult, detectFaceResult, detectFaceResult],
161
162
  "scenario": "CropCentralFace",
163
+ "transactionId": "test0",
162
164
  "error": detectFacesException,
163
165
  };
164
166
 
@@ -171,6 +173,9 @@ export var faceCaptureConfig = {
171
173
  "detectOcclusion": false,
172
174
  "showFaceAnimation": true,
173
175
  "preventScreenRecording": false,
176
+ "usbCamera": false,
177
+ "usbCameraMirrorPreview": true,
178
+ "rejectMultipleFaces": true,
174
179
  "cameraPositionAndroid": 0,
175
180
  "cameraPositionIOS": 1,
176
181
  "screenOrientation": [0, 1],
@@ -222,6 +227,8 @@ export var livenessConfig = {
222
227
  "screenOrientation": [0, 1],
223
228
  "locationTrackingEnabled": true,
224
229
  "preventScreenRecording": false,
230
+ "usbCamera": false,
231
+ "usbCameraMirrorPreview": true,
225
232
  "attemptsCount": 2,
226
233
  "recordingProcess": 0,
227
234
  "livenessType": 1,
@@ -240,6 +247,8 @@ export var verificationConfig = {
240
247
  "screenOrientation": [0, 1],
241
248
  "locationTrackingEnabled": true,
242
249
  "preventScreenRecording": false,
250
+ "usbCamera": false,
251
+ "usbCameraMirrorPreview": true,
243
252
  "attemptsCount": 2,
244
253
  "recordingProcess": 0,
245
254
  "livenessType": 1,
@@ -331,6 +340,7 @@ export var matchFacesResponse = {
331
340
  "results": [comparedFacesPair, comparedFacesPair, comparedFacesPair],
332
341
  "detections": [matchFacesDetection, matchFacesDetection, matchFacesDetection],
333
342
  "tag": "test",
343
+ "transactionId": "test1",
334
344
  "error": matchFacesException,
335
345
  };
336
346
  export var comparedFacesSplit = {
@@ -427,6 +437,8 @@ export var enrollmentConfig = {
427
437
  "screenOrientation": [0, 1],
428
438
  "locationTrackingEnabled": true,
429
439
  "preventScreenRecording": false,
440
+ "usbCamera": false,
441
+ "usbCameraMirrorPreview": true,
430
442
  "attemptsCount": 2,
431
443
  "recordingProcess": 0,
432
444
  "livenessType": 1,
@@ -13,9 +13,12 @@
13
13
  },
14
14
  "..": {
15
15
  "name": "@regulaforensics/face-sdk",
16
- "version": "1.0.0",
16
+ "version": "8.5.1575-rc",
17
17
  "dev": true,
18
- "license": "commercial"
18
+ "license": "commercial",
19
+ "dependencies": {
20
+ "@expo/config-plugins": "^10.0.0"
21
+ }
19
22
  },
20
23
  "node_modules/@esbuild/aix-ppc64": {
21
24
  "version": "0.25.9",