@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.
- 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 +1 -19
- package/android/src/main/kotlin/com/regula/plugin/face/sdk/JSONConstructor.kt +16 -16
- package/examples/capacitor/ios/App/App/Info.plist +0 -2
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +4 -4
- package/examples/capacitor/package-lock.json +209 -590
- package/examples/capacitor/package.json +3 -8
- package/examples/ionic/config.xml +1 -1
- package/examples/ionic/package-lock.json +2457 -2105
- package/examples/ionic/package.json +3 -20
- package/examples/react_native/package-lock.json +927 -571
- package/examples/react_native/package.json +3 -10
- package/examples/react_native/scripts/withoutMetroServer.js +8 -11
- package/ios/Config.swift +29 -21
- package/ios/Decoder.swift +21 -25
- 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 +0 -12
- package/test/package-lock.json +2 -5
- package/test/test.tsx +74 -66
- package/www/capacitor/customization/customization_images.js +0 -8
- package/www/capacitor/customization/screen_orientation.js +0 -2
- package/www/capacitor/detect_faces/detect_faces_response.js +0 -3
- package/www/capacitor/face_capture/face_capture_config.js +0 -12
- package/www/capacitor/liveness/enrollment_config.js +0 -8
- package/www/capacitor/liveness/liveness_config.js +0 -8
- package/www/capacitor/liveness/liveness_notification.js +2 -4
- package/www/capacitor/liveness/verification_config.js +0 -8
- package/www/capacitor/match_faces/match_faces_response.js +0 -3
- package/www/cordova.js +2 -56
- package/www/react-native/customization/customization_images.js +0 -8
- package/www/react-native/customization/screen_orientation.js +0 -2
- package/www/react-native/detect_faces/detect_faces_response.js +0 -3
- package/www/react-native/face_capture/face_capture_config.js +0 -12
- package/www/react-native/liveness/enrollment_config.js +0 -8
- package/www/react-native/liveness/liveness_config.js +0 -8
- package/www/react-native/liveness/liveness_notification.js +2 -4
- package/www/react-native/liveness/verification_config.js +0 -8
- package/www/react-native/match_faces/match_faces_response.js +0 -3
- package/www/types/customization/customization_images.d.ts +0 -1
- package/www/types/customization/screen_orientation.d.ts +0 -4
- package/www/types/detect_faces/detect_faces_response.d.ts +0 -3
- package/www/types/face_capture/face_capture_config.d.ts +0 -15
- package/www/types/liveness/enrollment_config.d.ts +0 -6
- package/www/types/liveness/liveness_backend_exception.d.ts +1 -1
- package/www/types/liveness/liveness_config.d.ts +0 -8
- package/www/types/liveness/liveness_notification.d.ts +0 -2
- package/www/types/liveness/verification_config.d.ts +0 -8
- package/www/types/match_faces/match_faces_response.d.ts +0 -3
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
"android": "scripts/android.sh"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@regulaforensics/face-sdk": "8.5.
|
|
11
|
-
"@regulaforensics/face-core-basic": "8.
|
|
12
|
-
"react-native": "0.88.
|
|
10
|
+
"@regulaforensics/face-sdk": "8.5.1577-rc",
|
|
11
|
+
"@regulaforensics/face-core-basic": "8.5.934-rc",
|
|
12
|
+
"react-native": "0.88.0",
|
|
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,13 +24,6 @@
|
|
|
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
|
-
}
|
|
34
27
|
}
|
|
35
28
|
}
|
|
36
29
|
}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
const { withAppDelegate, withAppBuildGradle, withMainApplication, withXcodeProject } = require('expo/config-plugins')
|
|
2
2
|
|
|
3
|
-
function replaceRequired(contents,
|
|
4
|
-
|
|
5
|
-
|
|
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))
|
|
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)
|
|
9
6
|
}
|
|
10
7
|
|
|
11
8
|
module.exports = config => {
|
|
12
9
|
config = withAppDelegate(config, config => {
|
|
13
10
|
let contents = config.modResults.contents
|
|
14
11
|
if (!contents.includes('// Standalone demo: no development menu.')) {
|
|
15
|
-
contents = replaceRequired(contents,
|
|
12
|
+
contents = replaceRequired(contents, /let factory = ExpoReactNativeFactory\(delegate: delegate\)/,
|
|
16
13
|
`let factory = ExpoReactNativeFactory(delegate: delegate)
|
|
17
14
|
// Standalone demo: no development menu.
|
|
18
15
|
#if DEBUG
|
|
@@ -21,10 +18,10 @@ module.exports = config => {
|
|
|
21
18
|
#endif`, 'React Native factory')
|
|
22
19
|
}
|
|
23
20
|
contents = replaceRequired(contents,
|
|
24
|
-
|
|
21
|
+
/override func bundleURL\(\) -> URL\? \{[\s\S]*?\n \}/,
|
|
25
22
|
`override func bundleURL() -> URL? {
|
|
26
23
|
return Bundle.main.url(forResource: "main", withExtension: "jsbundle")
|
|
27
|
-
}`, 'bundleURL method'
|
|
24
|
+
}`, 'bundleURL method')
|
|
28
25
|
config.modResults.contents = contents
|
|
29
26
|
return config
|
|
30
27
|
})
|
|
@@ -59,14 +56,14 @@ cp -R images "$DEST/web/"
|
|
|
59
56
|
config = withMainApplication(config, config => {
|
|
60
57
|
if (!config.modResults.contents.includes('useDevSupport = false')) {
|
|
61
58
|
config.modResults.contents = replaceRequired(config.modResults.contents,
|
|
62
|
-
|
|
59
|
+
/context = applicationContext,/, 'context = applicationContext,\n useDevSupport = false,', 'Android ReactHost context')
|
|
63
60
|
}
|
|
64
61
|
return config
|
|
65
62
|
})
|
|
66
63
|
|
|
67
64
|
config = withAppBuildGradle(config, config => {
|
|
68
65
|
if (!config.modResults.contents.includes('// Standalone demo: embed JS in Debug.')) {
|
|
69
|
-
config.modResults.contents = replaceRequired(config.modResults.contents,
|
|
66
|
+
config.modResults.contents = replaceRequired(config.modResults.contents, /react \{/,
|
|
70
67
|
`react {
|
|
71
68
|
// Standalone demo: embed JS in Debug.
|
|
72
69
|
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)
|
|
14
|
+
case("fonts"): dict[CustomizationFont.fromDartKey(k)] = UIFont.decode(v)
|
|
15
15
|
case("images"): dict[k] = UIImage.decode(v)
|
|
16
16
|
default: break
|
|
17
17
|
}
|
|
@@ -51,7 +51,6 @@ 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
|
|
55
54
|
case("cameraPositionIOS"): builder.cameraPosition = CameraPosition(rawValue: v as! Int)!
|
|
56
55
|
case("screenOrientation"): builder.screenOrientation = RFSScreenOrientation.decode(v)
|
|
57
56
|
case("timeout"): builder.timeoutInterval = v as? NSNumber
|
|
@@ -71,7 +70,6 @@ public extension FaceCaptureConfiguration {
|
|
|
71
70
|
"detectOcclusion": self.detectOcclusion,
|
|
72
71
|
"showFaceAnimation": self.showFaceAnimation,
|
|
73
72
|
"preventScreenRecording": self.isPreventScreenRecordingEnable,
|
|
74
|
-
"rejectMultipleFaces": self.rejectMultipleFaces,
|
|
75
73
|
"cameraPositionIOS": self.cameraPosition.rawValue,
|
|
76
74
|
"screenOrientation": self.screenOrientation.encode(),
|
|
77
75
|
"timeout": self.timeoutInterval,
|
|
@@ -197,7 +195,7 @@ public extension LivenessConfiguration {
|
|
|
197
195
|
case("tag"): builder.tag = v as? String
|
|
198
196
|
case("skipStep"): builder.stepSkippingMask = RFSLivenessStepSkip.decode(v)
|
|
199
197
|
case("metadata"): builder.metadata = v as! [String: Any]
|
|
200
|
-
case("personId"): builder.personId = v as
|
|
198
|
+
case("personId"): builder.personId = v as! String
|
|
201
199
|
case("threshold"): builder.threshold = v as? NSNumber
|
|
202
200
|
default: break
|
|
203
201
|
}
|
|
@@ -254,34 +252,44 @@ extension UIColor {
|
|
|
254
252
|
// Create from a hex integer; supports #RGB, #ARGB, #RRGGBB, #AARRGGBB semantics
|
|
255
253
|
static func decode(_ it: Any?) -> Self? {
|
|
256
254
|
guard let it = it as? Int else { return nil }
|
|
257
|
-
|
|
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" }
|
|
258
265
|
// If length is 5 or 7, pad a leading 0 to restore a lost leading nibble
|
|
259
266
|
if hex.count == 5 || hex.count == 7 { hex = "0" + hex }
|
|
267
|
+
let s = hex.uppercased()
|
|
260
268
|
|
|
261
269
|
let a, r, g, b: CGFloat
|
|
262
|
-
switch
|
|
270
|
+
switch s.count {
|
|
263
271
|
case 3: // RGB
|
|
264
272
|
a = 1.0
|
|
265
|
-
r = Self.component(from:
|
|
266
|
-
g = Self.component(from:
|
|
267
|
-
b = Self.component(from:
|
|
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)
|
|
268
276
|
case 4: // ARGB
|
|
269
|
-
a = Self.component(from:
|
|
270
|
-
r = Self.component(from:
|
|
271
|
-
g = Self.component(from:
|
|
272
|
-
b = Self.component(from:
|
|
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)
|
|
273
281
|
case 6: // RRGGBB
|
|
274
282
|
a = 1.0
|
|
275
|
-
r = Self.component(from:
|
|
276
|
-
g = Self.component(from:
|
|
277
|
-
b = Self.component(from:
|
|
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)
|
|
278
286
|
case 8: // AARRGGBB
|
|
279
|
-
a = Self.component(from:
|
|
280
|
-
r = Self.component(from:
|
|
281
|
-
g = Self.component(from:
|
|
282
|
-
b = Self.component(from:
|
|
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)
|
|
283
291
|
default:
|
|
284
|
-
assertionFailure("Invalid color value: #\(
|
|
292
|
+
assertionFailure("Invalid color value: #\(s). Expected #RGB, #ARGB, #RRGGBB, or #AARRGGBB")
|
|
285
293
|
return nil
|
|
286
294
|
}
|
|
287
295
|
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]])?.
|
|
153
|
+
result.setValue((it["searchPersons"] as? [[String: Any]])?.compactMap { PersonDatabase.SearchPerson.decode2($0) }, 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
|
|
273
|
+
let result = Self(images: (it["images"] as! [[String: Any?]]).compactMap { MatchFacesImage.decode($0) })
|
|
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?]]).
|
|
328
|
+
landmarks: (it["landmarks"] as! [[String: Any?]]).compactMap { Point.decode($0) },
|
|
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
|
|
358
|
+
(it["faces"] as? [Any])?.map { MatchFacesDetectionFace.decode($0) },
|
|
359
359
|
nil
|
|
360
360
|
)})
|
|
361
361
|
}
|
|
@@ -411,14 +411,13 @@ 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:
|
|
414
|
+
let sel = "initWithResults:detections:error:".selector()
|
|
415
415
|
let result = privateInit(alloc, sel, (@convention(c)(
|
|
416
416
|
AnyObject, Selector,
|
|
417
|
-
Any?, Any?, Any
|
|
417
|
+
Any?, Any?, Any?) -> Unmanaged<AnyObject>?).self, { f in f(
|
|
418
418
|
alloc, sel,
|
|
419
|
-
(it["results"] as? [Any])?.map
|
|
420
|
-
(it["detections"] as? [Any])?.map
|
|
421
|
-
it["transactionId"],
|
|
419
|
+
(it["results"] as? [Any])?.map { MatchFacesComparedFacesPair.decode($0) },
|
|
420
|
+
(it["detections"] as? [Any])?.map { MatchFacesDetection.decode($0) },
|
|
422
421
|
nil
|
|
423
422
|
)}) as MatchFacesResponse
|
|
424
423
|
result.setValue(it["tag"] as? String, forKey: "tag")
|
|
@@ -430,7 +429,6 @@ public extension MatchFacesResponse {
|
|
|
430
429
|
"detections": self.detections.map { $0.encode() },
|
|
431
430
|
"error": self.error?.encode(),
|
|
432
431
|
"tag": self.tag,
|
|
433
|
-
"transactionId": self.transactionId,
|
|
434
432
|
]
|
|
435
433
|
}
|
|
436
434
|
}
|
|
@@ -555,7 +553,7 @@ public extension DetectFacesConfiguration {
|
|
|
555
553
|
static func decode(_ it: Any?) -> Self {
|
|
556
554
|
let it = it as! [String: Any]
|
|
557
555
|
let result = Self()
|
|
558
|
-
result.customQuality = (it["customQuality"] as? [[String: Any]])?.
|
|
556
|
+
result.customQuality = (it["customQuality"] as? [[String: Any]])?.compactMap { ImageQualityCharacteristic.decode($0) }
|
|
559
557
|
result.outputImageParams = OutputImageParams.decode(it["outputImageParams"])
|
|
560
558
|
result.onlyCentralFace = it["onlyCentralFace"] as? Bool ?? false
|
|
561
559
|
result.attributes = (it["attributes"] as? [String])?.compactMap { DetectFacesAttribute(rawValue: $0) }
|
|
@@ -666,11 +664,11 @@ public extension DetectFaceResult {
|
|
|
666
664
|
Any, Selector,
|
|
667
665
|
Any?, Any?, Any?, CGRect, Any?, CGRect) -> Unmanaged<AnyObject>?).self, { f in f(
|
|
668
666
|
alloc, sel,
|
|
669
|
-
(it["quality"] as? [Any])?.map
|
|
670
|
-
(it["attributes"] as? [Any])?.map
|
|
667
|
+
(it["quality"] as? [Any])?.map { ImageQualityResult.decode($0) },
|
|
668
|
+
(it["attributes"] as? [Any])?.map{ DetectFacesAttributeResult.decode($0) },
|
|
671
669
|
it["crop"],
|
|
672
670
|
CGRect.decode(it["faceRect"]),
|
|
673
|
-
(it["landmarks"] as? [Any])?.map
|
|
671
|
+
(it["landmarks"] as? [Any])?.map{ Point.decode($0) },
|
|
674
672
|
CGRect.decode(it["originalRect"])
|
|
675
673
|
)})
|
|
676
674
|
}
|
|
@@ -691,14 +689,13 @@ public extension DetectFacesResponse {
|
|
|
691
689
|
static func decode(_ it: Any?) -> Self {
|
|
692
690
|
let it = it as! [String: Any]
|
|
693
691
|
let alloc = DetectFacesResponse.allocate()
|
|
694
|
-
let sel = "initWithDetections:scenario:
|
|
692
|
+
let sel = "initWithDetections:scenario:error:".selector()
|
|
695
693
|
return privateInit(alloc, sel, (@convention(c)(
|
|
696
694
|
Any, Selector,
|
|
697
|
-
Any?, Any?, Any
|
|
695
|
+
Any?, Any?, Any?) -> Unmanaged<AnyObject>?).self, { f in f(
|
|
698
696
|
alloc, sel,
|
|
699
|
-
(it["allDetections"] as? [Any])?.map
|
|
697
|
+
(it["allDetections"] as? [Any])?.map { DetectFaceResult.decode($0) },
|
|
700
698
|
it["scenario"],
|
|
701
|
-
it["transactionId"],
|
|
702
699
|
nil
|
|
703
700
|
)})
|
|
704
701
|
}
|
|
@@ -708,7 +705,6 @@ public extension DetectFacesResponse {
|
|
|
708
705
|
"error": self.error?.encode(),
|
|
709
706
|
"allDetections": self.allDetections?.map { $0.encode() },
|
|
710
707
|
"scenario": self.scenario,
|
|
711
|
-
"transactionId": self.transactionId,
|
|
712
708
|
]
|
|
713
709
|
}
|
|
714
710
|
}
|
|
@@ -746,10 +742,10 @@ public extension DBPageResponse<PersonDatabase.Person> {
|
|
|
746
742
|
func encode() -> [String: Any?] { return encodeDBPageResponse(self, self.items?.compactMap{ $0.encode() }) }
|
|
747
743
|
}
|
|
748
744
|
public extension DBPageResponse<PersonDatabase.PersonImage> {
|
|
749
|
-
func encode() -> [String: Any?] { return encodeDBPageResponse(self, self.items?.
|
|
745
|
+
func encode() -> [String: Any?] { return encodeDBPageResponse(self, self.items?.compactMap{ $0.encode() }) }
|
|
750
746
|
}
|
|
751
747
|
public extension DBPageResponse<PersonDatabase.PersonGroup> {
|
|
752
|
-
func encode() -> [String: Any?] { return encodeDBPageResponse(self, self.items?.
|
|
748
|
+
func encode() -> [String: Any?] { return encodeDBPageResponse(self, self.items?.compactMap{ $0.encode() }) }
|
|
753
749
|
}
|
|
754
750
|
|
|
755
751
|
public extension Date {
|
|
@@ -924,14 +920,14 @@ public extension PersonDatabase.SearchPersonDetection {
|
|
|
924
920
|
CGRect, Any?, Any?, Any?) -> Unmanaged<AnyObject>?).self, { f in f(
|
|
925
921
|
alloc, sel,
|
|
926
922
|
CGRect.decode(it["rect"]),
|
|
927
|
-
(it["landmarks"] as? [Any])?.map
|
|
923
|
+
(it["landmarks"] as? [Any])?.map { Point.decode($0) },
|
|
928
924
|
UIImage.decode(it["crop"]),
|
|
929
925
|
it["rotationAngle"]
|
|
930
926
|
)})
|
|
931
927
|
}
|
|
932
928
|
func encode() -> [String: Any?] {
|
|
933
929
|
return [
|
|
934
|
-
"landmarks": self.landmarks.
|
|
930
|
+
"landmarks": self.landmarks.compactMap({ $0.encode() }),
|
|
935
931
|
"rect": self.rect.encode(),
|
|
936
932
|
"crop": self.crop?.encode(),
|
|
937
933
|
"rotationAngle": self.rotationAngle,
|
|
@@ -977,7 +973,7 @@ public extension PersonDatabase.SearchPerson {
|
|
|
977
973
|
result.setValue(it["groups"] as Any?, forKey: "groups")
|
|
978
974
|
result.setValue(it["id"] as Any?, forKey: "itemId")
|
|
979
975
|
result.setValue((it["metadata"] as Any?) ?? NSNull(), forKey: "mutableMetadata")
|
|
980
|
-
result.setValue((it["images"] as? [Any])?.map
|
|
976
|
+
result.setValue((it["images"] as? [Any])?.map { PersonDatabase.SearchPersonImage.decode2($0) }, forKey: "images")
|
|
981
977
|
result.setValue(PersonDatabase.SearchPersonDetection.decode(it["detection"]), forKey: "detection")
|
|
982
978
|
result.setValue(it["externalId"] as Any?, forKey: "externalId")
|
|
983
979
|
result.setValue(Date.decode(it["expireAt"]), forKey: "expireAt")
|
|
@@ -987,7 +983,7 @@ public extension PersonDatabase.SearchPerson {
|
|
|
987
983
|
func encode2() -> [String: Any?] {
|
|
988
984
|
return [
|
|
989
985
|
"detection": self.detection.encode(),
|
|
990
|
-
"images": self.images.
|
|
986
|
+
"images": self.images.compactMap({ $0.encode2() }),
|
|
991
987
|
"createdAt": self.createdAt?.encode(),
|
|
992
988
|
"updatedAt": self.updatedAt?.encode(),
|
|
993
989
|
"name": self.name,
|
package/ios/Implementation.swift
CHANGED
|
@@ -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?]]).
|
|
86
|
+
pairs: (args(0) as [[String: Any?]]).compactMap { MatchFacesComparedFacesPair.decode($0) },
|
|
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?.
|
|
163
|
+
completion: { callback(encodeDBItemResponse($0.results?.compactMap{ $0.encode2() }, $0.error)) })
|
|
164
164
|
default: break
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
// MARK: -
|
|
168
|
+
// MARK: - Implementation
|
|
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.
|
|
3
|
+
"version": "8.5.1577-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.
|
|
2
|
+
<plugin id="@regulaforensics/face-sdk" version="8.5.1577-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.5.
|
|
30
|
+
<pod name="FaceSDKStage" spec="8.5.5293" 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.
|
|
3
|
+
s.version = '8.5.1577-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 'FaceSDKStage', '8.5.
|
|
12
|
+
s.dependency 'FaceSDKStage', '8.5.5293'
|
|
13
13
|
s.dependency 'React'
|
|
14
14
|
end
|
package/test/json.tsx
CHANGED
|
@@ -68,7 +68,6 @@ export var customizationImages = {
|
|
|
68
68
|
"retryScreenHintChangeBackground": img1,
|
|
69
69
|
"retryScreenHintFaceOcclusions": img2,
|
|
70
70
|
"retryScreenHintCovering": img3,
|
|
71
|
-
"retryScreenHintRejectMultipleFaces": img2,
|
|
72
71
|
"processingScreenCloseButton": img1,
|
|
73
72
|
"successScreenImage": img2,
|
|
74
73
|
};
|
|
@@ -160,7 +159,6 @@ export var detectFacesResponse = {
|
|
|
160
159
|
"detection": detectFaceResult,
|
|
161
160
|
"allDetections": [detectFaceResult, detectFaceResult, detectFaceResult],
|
|
162
161
|
"scenario": "CropCentralFace",
|
|
163
|
-
"transactionId": "test0",
|
|
164
162
|
"error": detectFacesException,
|
|
165
163
|
};
|
|
166
164
|
|
|
@@ -173,9 +171,6 @@ export var faceCaptureConfig = {
|
|
|
173
171
|
"detectOcclusion": false,
|
|
174
172
|
"showFaceAnimation": true,
|
|
175
173
|
"preventScreenRecording": false,
|
|
176
|
-
"usbCamera": false,
|
|
177
|
-
"usbCameraMirrorPreview": true,
|
|
178
|
-
"rejectMultipleFaces": true,
|
|
179
174
|
"cameraPositionAndroid": 0,
|
|
180
175
|
"cameraPositionIOS": 1,
|
|
181
176
|
"screenOrientation": [0, 1],
|
|
@@ -227,8 +222,6 @@ export var livenessConfig = {
|
|
|
227
222
|
"screenOrientation": [0, 1],
|
|
228
223
|
"locationTrackingEnabled": true,
|
|
229
224
|
"preventScreenRecording": false,
|
|
230
|
-
"usbCamera": false,
|
|
231
|
-
"usbCameraMirrorPreview": true,
|
|
232
225
|
"attemptsCount": 2,
|
|
233
226
|
"recordingProcess": 0,
|
|
234
227
|
"livenessType": 1,
|
|
@@ -247,8 +240,6 @@ export var verificationConfig = {
|
|
|
247
240
|
"screenOrientation": [0, 1],
|
|
248
241
|
"locationTrackingEnabled": true,
|
|
249
242
|
"preventScreenRecording": false,
|
|
250
|
-
"usbCamera": false,
|
|
251
|
-
"usbCameraMirrorPreview": true,
|
|
252
243
|
"attemptsCount": 2,
|
|
253
244
|
"recordingProcess": 0,
|
|
254
245
|
"livenessType": 1,
|
|
@@ -340,7 +331,6 @@ export var matchFacesResponse = {
|
|
|
340
331
|
"results": [comparedFacesPair, comparedFacesPair, comparedFacesPair],
|
|
341
332
|
"detections": [matchFacesDetection, matchFacesDetection, matchFacesDetection],
|
|
342
333
|
"tag": "test",
|
|
343
|
-
"transactionId": "test1",
|
|
344
334
|
"error": matchFacesException,
|
|
345
335
|
};
|
|
346
336
|
export var comparedFacesSplit = {
|
|
@@ -437,8 +427,6 @@ export var enrollmentConfig = {
|
|
|
437
427
|
"screenOrientation": [0, 1],
|
|
438
428
|
"locationTrackingEnabled": true,
|
|
439
429
|
"preventScreenRecording": false,
|
|
440
|
-
"usbCamera": false,
|
|
441
|
-
"usbCameraMirrorPreview": true,
|
|
442
430
|
"attemptsCount": 2,
|
|
443
431
|
"recordingProcess": 0,
|
|
444
432
|
"livenessType": 1,
|
package/test/package-lock.json
CHANGED
|
@@ -13,12 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
"..": {
|
|
15
15
|
"name": "@regulaforensics/face-sdk",
|
|
16
|
-
"version": "
|
|
16
|
+
"version": "1.0.0",
|
|
17
17
|
"dev": true,
|
|
18
|
-
"license": "commercial"
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@expo/config-plugins": "^10.0.0"
|
|
21
|
-
}
|
|
18
|
+
"license": "commercial"
|
|
22
19
|
},
|
|
23
20
|
"node_modules/@esbuild/aix-ppc64": {
|
|
24
21
|
"version": "0.25.9",
|