@yeomessagingcom/react-native-yeofr 0.1.15 → 0.1.16
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/ios/YEOFR.xcframework/ios-arm64/YEOFR.framework/Info.plist +0 -0
- package/ios/YEOFR.xcframework/ios-arm64/YEOFR.framework/Modules/YEOFR.swiftmodule/arm64-apple-ios.abi.json +120 -1
- package/ios/YEOFR.xcframework/ios-arm64/YEOFR.framework/Modules/YEOFR.swiftmodule/arm64-apple-ios.private.swiftinterface +13 -2
- package/ios/YEOFR.xcframework/ios-arm64/YEOFR.framework/Modules/YEOFR.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/YEOFR.xcframework/ios-arm64/YEOFR.framework/Modules/YEOFR.swiftmodule/arm64-apple-ios.swiftinterface +13 -2
- package/ios/YEOFR.xcframework/ios-arm64/YEOFR.framework/YEOFR +0 -0
- package/ios/YEOFR.xcframework/ios-arm64/YEOFR.framework/_CodeSignature/CodeResources +11 -11
- package/ios/YEOFRModule.m +12 -0
- package/ios/YEOFRModule.swift +32 -0
- package/ios/react-native-yeofr.podspec +1 -1
- package/package.json +2 -2
|
Binary file
|
|
@@ -3459,6 +3459,118 @@
|
|
|
3459
3459
|
"RawDocComment"
|
|
3460
3460
|
],
|
|
3461
3461
|
"funcSelfKind": "NonMutating"
|
|
3462
|
+
},
|
|
3463
|
+
{
|
|
3464
|
+
"kind": "Function",
|
|
3465
|
+
"name": "detectFacesFromBase64",
|
|
3466
|
+
"printedName": "detectFacesFromBase64(height:width:scanLine:ratio:bufferBase64:needFaceRect:uuidString:)",
|
|
3467
|
+
"children": [
|
|
3468
|
+
{
|
|
3469
|
+
"kind": "TypeNominal",
|
|
3470
|
+
"name": "NSDictionary",
|
|
3471
|
+
"printedName": "Foundation.NSDictionary",
|
|
3472
|
+
"usr": "c:objc(cs)NSDictionary"
|
|
3473
|
+
},
|
|
3474
|
+
{
|
|
3475
|
+
"kind": "TypeNominal",
|
|
3476
|
+
"name": "Int32",
|
|
3477
|
+
"printedName": "Swift.Int32",
|
|
3478
|
+
"usr": "s:s5Int32V"
|
|
3479
|
+
},
|
|
3480
|
+
{
|
|
3481
|
+
"kind": "TypeNominal",
|
|
3482
|
+
"name": "Int32",
|
|
3483
|
+
"printedName": "Swift.Int32",
|
|
3484
|
+
"usr": "s:s5Int32V"
|
|
3485
|
+
},
|
|
3486
|
+
{
|
|
3487
|
+
"kind": "TypeNominal",
|
|
3488
|
+
"name": "Int32",
|
|
3489
|
+
"printedName": "Swift.Int32",
|
|
3490
|
+
"usr": "s:s5Int32V"
|
|
3491
|
+
},
|
|
3492
|
+
{
|
|
3493
|
+
"kind": "TypeNominal",
|
|
3494
|
+
"name": "Float",
|
|
3495
|
+
"printedName": "Swift.Float",
|
|
3496
|
+
"usr": "s:Sf"
|
|
3497
|
+
},
|
|
3498
|
+
{
|
|
3499
|
+
"kind": "TypeNominal",
|
|
3500
|
+
"name": "String",
|
|
3501
|
+
"printedName": "Swift.String",
|
|
3502
|
+
"usr": "s:SS"
|
|
3503
|
+
},
|
|
3504
|
+
{
|
|
3505
|
+
"kind": "TypeNominal",
|
|
3506
|
+
"name": "Bool",
|
|
3507
|
+
"printedName": "Swift.Bool",
|
|
3508
|
+
"usr": "s:Sb"
|
|
3509
|
+
},
|
|
3510
|
+
{
|
|
3511
|
+
"kind": "TypeNominal",
|
|
3512
|
+
"name": "Optional",
|
|
3513
|
+
"printedName": "Swift.String?",
|
|
3514
|
+
"children": [
|
|
3515
|
+
{
|
|
3516
|
+
"kind": "TypeNominal",
|
|
3517
|
+
"name": "String",
|
|
3518
|
+
"printedName": "Swift.String",
|
|
3519
|
+
"usr": "s:SS"
|
|
3520
|
+
}
|
|
3521
|
+
],
|
|
3522
|
+
"hasDefaultArg": true,
|
|
3523
|
+
"usr": "s:Sq"
|
|
3524
|
+
}
|
|
3525
|
+
],
|
|
3526
|
+
"declKind": "Func",
|
|
3527
|
+
"usr": "s:5YEOFR8YEOFRSDKC21detectFacesFromBase646height5width8scanLine5ratio06bufferF012needFaceRect10uuidStringSo12NSDictionaryCs5Int32V_A2OSfSSSbSSSgtF",
|
|
3528
|
+
"mangledName": "$s5YEOFR8YEOFRSDKC21detectFacesFromBase646height5width8scanLine5ratio06bufferF012needFaceRect10uuidStringSo12NSDictionaryCs5Int32V_A2OSfSSSbSSSgtF",
|
|
3529
|
+
"moduleName": "YEOFR",
|
|
3530
|
+
"declAttributes": [
|
|
3531
|
+
"Final",
|
|
3532
|
+
"AccessControl",
|
|
3533
|
+
"RawDocComment"
|
|
3534
|
+
],
|
|
3535
|
+
"isFromExtension": true,
|
|
3536
|
+
"funcSelfKind": "NonMutating"
|
|
3537
|
+
},
|
|
3538
|
+
{
|
|
3539
|
+
"kind": "Function",
|
|
3540
|
+
"name": "detectFaces",
|
|
3541
|
+
"printedName": "detectFaces(from:needFaceRect:)",
|
|
3542
|
+
"children": [
|
|
3543
|
+
{
|
|
3544
|
+
"kind": "TypeNominal",
|
|
3545
|
+
"name": "NSDictionary",
|
|
3546
|
+
"printedName": "Foundation.NSDictionary",
|
|
3547
|
+
"usr": "c:objc(cs)NSDictionary"
|
|
3548
|
+
},
|
|
3549
|
+
{
|
|
3550
|
+
"kind": "TypeNominal",
|
|
3551
|
+
"name": "CVBuffer",
|
|
3552
|
+
"printedName": "CoreVideo.CVBuffer",
|
|
3553
|
+
"usr": "c:@T@CVBufferRef"
|
|
3554
|
+
},
|
|
3555
|
+
{
|
|
3556
|
+
"kind": "TypeNominal",
|
|
3557
|
+
"name": "Bool",
|
|
3558
|
+
"printedName": "Swift.Bool",
|
|
3559
|
+
"hasDefaultArg": true,
|
|
3560
|
+
"usr": "s:Sb"
|
|
3561
|
+
}
|
|
3562
|
+
],
|
|
3563
|
+
"declKind": "Func",
|
|
3564
|
+
"usr": "s:5YEOFR8YEOFRSDKC11detectFaces4from12needFaceRectSo12NSDictionaryCSo11CVBufferRefa_SbtF",
|
|
3565
|
+
"mangledName": "$s5YEOFR8YEOFRSDKC11detectFaces4from12needFaceRectSo12NSDictionaryCSo11CVBufferRefa_SbtF",
|
|
3566
|
+
"moduleName": "YEOFR",
|
|
3567
|
+
"declAttributes": [
|
|
3568
|
+
"Final",
|
|
3569
|
+
"AccessControl",
|
|
3570
|
+
"RawDocComment"
|
|
3571
|
+
],
|
|
3572
|
+
"isFromExtension": true,
|
|
3573
|
+
"funcSelfKind": "NonMutating"
|
|
3462
3574
|
}
|
|
3463
3575
|
],
|
|
3464
3576
|
"declKind": "Class",
|
|
@@ -3574,7 +3686,7 @@
|
|
|
3574
3686
|
"kind": "StringLiteral",
|
|
3575
3687
|
"offset": 724,
|
|
3576
3688
|
"length": 7,
|
|
3577
|
-
"value": "\"0.1.
|
|
3689
|
+
"value": "\"0.1.4\""
|
|
3578
3690
|
},
|
|
3579
3691
|
{
|
|
3580
3692
|
"filePath": "\/Users\/paulcalver\/workspace\/ios\/YEOFRWorkspace\/YEOFR\/YEOFR\/YEOFRSDK.swift",
|
|
@@ -3610,6 +3722,13 @@
|
|
|
3610
3722
|
"offset": 4872,
|
|
3611
3723
|
"length": 4,
|
|
3612
3724
|
"value": "true"
|
|
3725
|
+
},
|
|
3726
|
+
{
|
|
3727
|
+
"filePath": "\/Users\/paulcalver\/workspace\/ios\/YEOFRWorkspace\/YEOFR\/YEOFR\/YEOFRSDK.swift",
|
|
3728
|
+
"kind": "BooleanLiteral",
|
|
3729
|
+
"offset": 13139,
|
|
3730
|
+
"length": 4,
|
|
3731
|
+
"value": "true"
|
|
3613
3732
|
}
|
|
3614
3733
|
]
|
|
3615
3734
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
|
-
// swift-compiler-version: Apple Swift version 6.
|
|
3
|
-
// swift-module-flags: -target arm64-apple-ios18.2 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name YEOFR
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios18.2 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name YEOFR
|
|
4
|
+
// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
|
|
4
5
|
import AVFoundation
|
|
5
6
|
import CoreImage
|
|
6
7
|
import CoreVideo
|
|
@@ -40,7 +41,9 @@ public struct SDKFaceRecognitionResult : Swift.Equatable {
|
|
|
40
41
|
public var faceRects: [Swift.Int : CoreFoundation.CGRect]
|
|
41
42
|
public var uuid: Foundation.UUID
|
|
42
43
|
public var error: (any Swift.Error)?
|
|
44
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
43
45
|
public init(faceState: YEOFR.FaceRecognitionState = .notDetected, detectedCount: Swift.Int = 0, faceIDs: [Swift.Int : Swift.String?] = [:], faceRects: [Swift.Int : CoreFoundation.CGRect] = [:], error: (any Swift.Error)?)
|
|
46
|
+
#endif
|
|
44
47
|
public static func == (lhs: YEOFR.SDKFaceRecognitionResult, rhs: YEOFR.SDKFaceRecognitionResult) -> Swift.Bool
|
|
45
48
|
}
|
|
46
49
|
public enum YEOFRDefaults {
|
|
@@ -83,7 +86,9 @@ public typealias YEOFRTrackerHandle = Swift.Int64
|
|
|
83
86
|
@discardableResult
|
|
84
87
|
final public func enroll(faceID: Swift.Int64, name: Swift.String, learnFromCurrentFrame: Swift.Bool = true) -> YEOFR.FRSDKReturnCode
|
|
85
88
|
final public func detectFaces(params: YEOFR.ImageFrameParameters, needFaceRect: Swift.Bool = true) -> YEOFR.SDKFaceRecognitionResult
|
|
89
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
86
90
|
final public func faceRecognitionTrackerData() -> Foundation.Data?
|
|
91
|
+
#endif
|
|
87
92
|
@discardableResult
|
|
88
93
|
final public func loadTracker(from data: Foundation.Data) -> YEOFR.FRSDKReturnCode
|
|
89
94
|
@discardableResult
|
|
@@ -92,5 +97,11 @@ public typealias YEOFRTrackerHandle = Swift.Int64
|
|
|
92
97
|
final public func configureFRSDK(config: any YEOFR.YEOFRConfigurable) -> YEOFR.FRSDKReturnCode
|
|
93
98
|
@objc deinit
|
|
94
99
|
}
|
|
100
|
+
extension YEOFR.YEOFRSDK {
|
|
101
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
102
|
+
final public func detectFacesFromBase64(height: Swift.Int32, width: Swift.Int32, scanLine: Swift.Int32, ratio: Swift.Float, bufferBase64: Swift.String, needFaceRect: Swift.Bool, uuidString: Swift.String? = nil) -> Foundation.NSDictionary
|
|
103
|
+
#endif
|
|
104
|
+
final public func detectFaces(from pixelBuffer: CoreVideo.CVImageBuffer, needFaceRect: Swift.Bool = true) -> Foundation.NSDictionary
|
|
105
|
+
}
|
|
95
106
|
extension YEOFR.FaceRecognitionState : Swift.Equatable {}
|
|
96
107
|
extension YEOFR.FaceRecognitionState : Swift.Hashable {}
|
|
Binary file
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
|
-
// swift-compiler-version: Apple Swift version 6.
|
|
3
|
-
// swift-module-flags: -target arm64-apple-ios18.2 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name YEOFR
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios18.2 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name YEOFR
|
|
4
|
+
// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
|
|
4
5
|
import AVFoundation
|
|
5
6
|
import CoreImage
|
|
6
7
|
import CoreVideo
|
|
@@ -40,7 +41,9 @@ public struct SDKFaceRecognitionResult : Swift.Equatable {
|
|
|
40
41
|
public var faceRects: [Swift.Int : CoreFoundation.CGRect]
|
|
41
42
|
public var uuid: Foundation.UUID
|
|
42
43
|
public var error: (any Swift.Error)?
|
|
44
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
43
45
|
public init(faceState: YEOFR.FaceRecognitionState = .notDetected, detectedCount: Swift.Int = 0, faceIDs: [Swift.Int : Swift.String?] = [:], faceRects: [Swift.Int : CoreFoundation.CGRect] = [:], error: (any Swift.Error)?)
|
|
46
|
+
#endif
|
|
44
47
|
public static func == (lhs: YEOFR.SDKFaceRecognitionResult, rhs: YEOFR.SDKFaceRecognitionResult) -> Swift.Bool
|
|
45
48
|
}
|
|
46
49
|
public enum YEOFRDefaults {
|
|
@@ -83,7 +86,9 @@ public typealias YEOFRTrackerHandle = Swift.Int64
|
|
|
83
86
|
@discardableResult
|
|
84
87
|
final public func enroll(faceID: Swift.Int64, name: Swift.String, learnFromCurrentFrame: Swift.Bool = true) -> YEOFR.FRSDKReturnCode
|
|
85
88
|
final public func detectFaces(params: YEOFR.ImageFrameParameters, needFaceRect: Swift.Bool = true) -> YEOFR.SDKFaceRecognitionResult
|
|
89
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
86
90
|
final public func faceRecognitionTrackerData() -> Foundation.Data?
|
|
91
|
+
#endif
|
|
87
92
|
@discardableResult
|
|
88
93
|
final public func loadTracker(from data: Foundation.Data) -> YEOFR.FRSDKReturnCode
|
|
89
94
|
@discardableResult
|
|
@@ -92,5 +97,11 @@ public typealias YEOFRTrackerHandle = Swift.Int64
|
|
|
92
97
|
final public func configureFRSDK(config: any YEOFR.YEOFRConfigurable) -> YEOFR.FRSDKReturnCode
|
|
93
98
|
@objc deinit
|
|
94
99
|
}
|
|
100
|
+
extension YEOFR.YEOFRSDK {
|
|
101
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
102
|
+
final public func detectFacesFromBase64(height: Swift.Int32, width: Swift.Int32, scanLine: Swift.Int32, ratio: Swift.Float, bufferBase64: Swift.String, needFaceRect: Swift.Bool, uuidString: Swift.String? = nil) -> Foundation.NSDictionary
|
|
103
|
+
#endif
|
|
104
|
+
final public func detectFaces(from pixelBuffer: CoreVideo.CVImageBuffer, needFaceRect: Swift.Bool = true) -> Foundation.NSDictionary
|
|
105
|
+
}
|
|
95
106
|
extension YEOFR.FaceRecognitionState : Swift.Equatable {}
|
|
96
107
|
extension YEOFR.FaceRecognitionState : Swift.Hashable {}
|
|
Binary file
|
|
@@ -14,27 +14,27 @@
|
|
|
14
14
|
</data>
|
|
15
15
|
<key>Info.plist</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
E+L/ropdMFzEFbvRWMFake530Pw=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/YEOFR.swiftmodule/arm64-apple-ios.abi.json</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
UmexFfVhh5uxfPklH6SWMKmzfCo=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/YEOFR.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
CpbmBhBROxTNwf5OscLww5YZPaU=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/YEOFR.swiftmodule/arm64-apple-ios.swiftdoc</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
eNOBUXQCBuEcLZKty91SorBMjbI=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/YEOFR.swiftmodule/arm64-apple-ios.swiftinterface</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
CpbmBhBROxTNwf5OscLww5YZPaU=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/YEOFR.swiftmodule/arm64-apple-ios.swiftmodule</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
+tD/XGP2tlJ++pm+e+WiHk4TLYQ=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/module.modulemap</key>
|
|
40
40
|
<data>
|
|
@@ -61,35 +61,35 @@
|
|
|
61
61
|
<dict>
|
|
62
62
|
<key>hash2</key>
|
|
63
63
|
<data>
|
|
64
|
-
|
|
64
|
+
i2Qwz3LGl0aNB3ehFZ1SCxs9H+zTJHD47jSkcQ7Wjr8=
|
|
65
65
|
</data>
|
|
66
66
|
</dict>
|
|
67
67
|
<key>Modules/YEOFR.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
|
|
68
68
|
<dict>
|
|
69
69
|
<key>hash2</key>
|
|
70
70
|
<data>
|
|
71
|
-
|
|
71
|
+
WCqsiUZ5K6CPuSK8rYYAweHYIpC+XxXtR1kfPoN3aLo=
|
|
72
72
|
</data>
|
|
73
73
|
</dict>
|
|
74
74
|
<key>Modules/YEOFR.swiftmodule/arm64-apple-ios.swiftdoc</key>
|
|
75
75
|
<dict>
|
|
76
76
|
<key>hash2</key>
|
|
77
77
|
<data>
|
|
78
|
-
|
|
78
|
+
6HEwhbQyMxCqk/f93unGTThbbLJSk4tIxBkv6Ol/zLo=
|
|
79
79
|
</data>
|
|
80
80
|
</dict>
|
|
81
81
|
<key>Modules/YEOFR.swiftmodule/arm64-apple-ios.swiftinterface</key>
|
|
82
82
|
<dict>
|
|
83
83
|
<key>hash2</key>
|
|
84
84
|
<data>
|
|
85
|
-
|
|
85
|
+
WCqsiUZ5K6CPuSK8rYYAweHYIpC+XxXtR1kfPoN3aLo=
|
|
86
86
|
</data>
|
|
87
87
|
</dict>
|
|
88
88
|
<key>Modules/YEOFR.swiftmodule/arm64-apple-ios.swiftmodule</key>
|
|
89
89
|
<dict>
|
|
90
90
|
<key>hash2</key>
|
|
91
91
|
<data>
|
|
92
|
-
|
|
92
|
+
A4G+GpB2/TSGN2NiSh+OKqjNDmtfv6SP+/Ib++sjy38=
|
|
93
93
|
</data>
|
|
94
94
|
</dict>
|
|
95
95
|
<key>Modules/module.modulemap</key>
|
package/ios/YEOFRModule.m
CHANGED
|
@@ -27,4 +27,16 @@ RCT_EXTERN_METHOD(enroll:(nonnull NSNumber *)faceID
|
|
|
27
27
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
28
28
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
29
29
|
|
|
30
|
+
// JS → iOS path (base64 ARGB32)
|
|
31
|
+
// Use this when you want to call detection explicitly from JS.
|
|
32
|
+
RCT_EXTERN_METHOD(detectFaces:(nonnull NSNumber *)height
|
|
33
|
+
width:(nonnull NSNumber *)width
|
|
34
|
+
scanLine:(nonnull NSNumber *)scanLine
|
|
35
|
+
ratio:(nonnull NSNumber *)ratio
|
|
36
|
+
bufferBase64:(nonnull NSString *)bufferBase64
|
|
37
|
+
needFaceRect:(BOOL)needFaceRect
|
|
38
|
+
uuid:(nullable NSString *)uuidString
|
|
39
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
40
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
41
|
+
|
|
30
42
|
@end
|
package/ios/YEOFRModule.swift
CHANGED
|
@@ -53,4 +53,36 @@ class YEOFRModule: NSObject {
|
|
|
53
53
|
let rc = sdk.enroll(faceID: faceID.int64Value, name: name, learnFromCurrentFrame: true)
|
|
54
54
|
rc == .OK ? resolve(rc.rawValue) : reject("rc", "enroll failed: \(rc.rawValue)", nil)
|
|
55
55
|
}
|
|
56
|
+
|
|
57
|
+
// MARK: - JS-callable: base64 path
|
|
58
|
+
@objc(detectFaces:width:scanLine:ratio:bufferBase64:needFaceRect:uuid:resolver:rejecter:)
|
|
59
|
+
func detectFaces(_ height: NSNumber,
|
|
60
|
+
width: NSNumber,
|
|
61
|
+
scanLine: NSNumber,
|
|
62
|
+
ratio: NSNumber,
|
|
63
|
+
bufferBase64: NSString,
|
|
64
|
+
needFaceRect: Bool,
|
|
65
|
+
uuid uuidString: NSString?,
|
|
66
|
+
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
67
|
+
rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
68
|
+
|
|
69
|
+
let dict = YEOFRSDK.shared.detectFacesFromBase64(
|
|
70
|
+
height: Int32(truncating: height),
|
|
71
|
+
width: Int32(truncating: width),
|
|
72
|
+
scanLine: Int32(truncating: scanLine),
|
|
73
|
+
ratio: ratio.floatValue,
|
|
74
|
+
bufferBase64: bufferBase64 as String,
|
|
75
|
+
needFaceRect: needFaceRect,
|
|
76
|
+
uuidString: uuidString as String?
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
// Decide policy: resolve always with payload (error lives in payload), or reject on error.
|
|
80
|
+
if let err = (dict["error"] as AnyObject?) as? [String: Any],
|
|
81
|
+
(err["message"] as? String)?.isEmpty == false {
|
|
82
|
+
// If prefer promise rejection, uncomment below and return:
|
|
83
|
+
// reject(err["code"] as? String ?? "detect_failed", err["message"] as? String ?? "Detection failed", nil); return
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
resolve(dict)
|
|
87
|
+
}
|
|
56
88
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Pod::Spec.new do |s|
|
|
2
2
|
s.name = "react-native-yeofr"
|
|
3
|
-
s.version = "0.1.
|
|
3
|
+
s.version = "0.1.16"
|
|
4
4
|
s.summary = "React Native iOS bridge for YEO Face Recognition."
|
|
5
5
|
s.homepage = "https://github.com/yeomessaging/react-native-yeofr"
|
|
6
6
|
s.license = { :type => "Commercial", :file => "LICENSE" }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yeomessagingcom/react-native-yeofr",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "React Native iOS integration for YEO Face Recognition (device-only).",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"react-native": "index.ts",
|
|
@@ -39,6 +39,6 @@
|
|
|
39
39
|
"@types/react-native": "^0.72.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@yeomessagingcom/react-native-yeofr": "^0.1.
|
|
42
|
+
"@yeomessagingcom/react-native-yeofr": "^0.1.16"
|
|
43
43
|
}
|
|
44
44
|
}
|