react-native-usesense 2.3.4 → 2.3.6
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/README.md +10 -7
- package/android/build.gradle +6 -6
- package/ios/UseSenseModule.m +21 -12
- package/package.json +2 -8
- package/react-native-usesense.podspec +4 -1
package/README.md
CHANGED
|
@@ -89,13 +89,16 @@ Without it, a release build fails at manifest merge
|
|
|
89
89
|
|
|
90
90
|
### New Architecture
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
92
|
+
The plugin works on **both** the New Architecture and the Old (Bridge)
|
|
93
|
+
Architecture, with no configuration difference. It's a native bridge
|
|
94
|
+
module, and RN's built-in legacy interop layer (on by default since RN
|
|
95
|
+
0.74) runs it transparently under the New Architecture — you don't need
|
|
96
|
+
to enable or change anything.
|
|
97
|
+
|
|
98
|
+
CI verifies both paths on every change: one job builds a release APK on
|
|
99
|
+
the Old Architecture, another builds a fresh RN app with the New
|
|
100
|
+
Architecture enabled. (It is not a native TurboModule — that migration
|
|
101
|
+
isn't required for New-Arch support and isn't currently planned.)
|
|
99
102
|
|
|
100
103
|
## Quick start
|
|
101
104
|
|
package/android/build.gradle
CHANGED
|
@@ -39,12 +39,12 @@ dependencies {
|
|
|
39
39
|
implementation "com.facebook.react:react-native:+"
|
|
40
40
|
|
|
41
41
|
// UseSense Android SDK — published to Maven Central at
|
|
42
|
-
// central.sonatype.com/artifact/ai.usesense/sdk.
|
|
43
|
-
//
|
|
44
|
-
// the
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
implementation "ai.usesense:sdk:4.6.
|
|
42
|
+
// central.sonatype.com/artifact/ai.usesense/sdk. 4.6.5 is the floor:
|
|
43
|
+
// earlier builds could hang forever on "Finalizing Enrollment" because
|
|
44
|
+
// the Play Integrity token request had no timeout and the signal upload
|
|
45
|
+
// joined it unbounded, wedging the verification before a single request
|
|
46
|
+
// was sent. mavenCentral() is already in the `repositories` block above.
|
|
47
|
+
implementation "ai.usesense:sdk:4.6.5"
|
|
48
48
|
|
|
49
49
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:${safeExtGet('kotlinVersion', '2.0.0')}"
|
|
50
50
|
}
|
package/ios/UseSenseModule.m
CHANGED
|
@@ -1,30 +1,39 @@
|
|
|
1
1
|
#import <React/RCTBridgeModule.h>
|
|
2
2
|
#import <React/RCTEventEmitter.h>
|
|
3
3
|
|
|
4
|
+
// Objective-C bridge declarations for the Swift `UseSenseModule` (an
|
|
5
|
+
// RCTEventEmitter). Each RCT_EXTERN_METHOD selector MUST match a Swift @objc
|
|
6
|
+
// method signature exactly, or the method is not exposed to JS.
|
|
7
|
+
//
|
|
8
|
+
// This file previously drifted from the Swift: it declared startSession /
|
|
9
|
+
// cancelSession / getSessionStatus / subscribeToEvents / unsubscribeFromEvents /
|
|
10
|
+
// getSdkVersion (none of which exist in UseSenseModule.swift) and OMITTED the
|
|
11
|
+
// methods JS actually calls (startVerification / reset / isInitialized), plus
|
|
12
|
+
// declared `initialize` without its resolver/rejecter. The result was that
|
|
13
|
+
// `UseSense.startVerification()` / `reset()` / `isInitialized()` silently failed
|
|
14
|
+
// on iOS. These declarations now mirror the Swift 1:1.
|
|
15
|
+
//
|
|
16
|
+
// addListener:/removeListeners: are provided by RCTEventEmitter itself and are
|
|
17
|
+
// intentionally not declared here.
|
|
4
18
|
@interface RCT_EXTERN_MODULE(UseSenseModule, RCTEventEmitter)
|
|
5
19
|
|
|
6
|
-
RCT_EXTERN_METHOD(initialize:(NSDictionary *)config
|
|
7
|
-
|
|
8
|
-
RCT_EXTERN_METHOD(startSession:(NSDictionary *)options
|
|
20
|
+
RCT_EXTERN_METHOD(initialize:(NSDictionary *)config
|
|
9
21
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
10
22
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
11
23
|
|
|
12
|
-
RCT_EXTERN_METHOD(
|
|
13
|
-
rejecter:(RCTPromiseRejectBlock)reject)
|
|
14
|
-
|
|
15
|
-
RCT_EXTERN_METHOD(getSessionStatus:(NSString *)sessionId
|
|
24
|
+
RCT_EXTERN_METHOD(startVerification:(NSDictionary *)request
|
|
16
25
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
17
26
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
18
27
|
|
|
19
|
-
RCT_EXTERN_METHOD(subscribeToEvents)
|
|
20
|
-
|
|
21
|
-
RCT_EXTERN_METHOD(unsubscribeFromEvents)
|
|
22
|
-
|
|
23
28
|
// LiveSense v4 passthrough (R-1)
|
|
24
29
|
RCT_EXTERN_METHOD(startV4Verification:(NSDictionary *)request
|
|
25
30
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
26
31
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
27
32
|
|
|
28
|
-
RCT_EXTERN_METHOD(
|
|
33
|
+
RCT_EXTERN_METHOD(reset:(RCTPromiseResolveBlock)resolve
|
|
34
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
35
|
+
|
|
36
|
+
RCT_EXTERN_METHOD(isInitialized:(RCTPromiseResolveBlock)resolve
|
|
37
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
29
38
|
|
|
30
39
|
@end
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-usesense",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.6",
|
|
4
4
|
"description": "React Native plugin for human presence verification. Wraps the native UseSense iOS and Android SDKs.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
"biometric",
|
|
40
40
|
"face-verification",
|
|
41
41
|
"deepfake-detection",
|
|
42
|
-
"presence-verification"
|
|
43
|
-
"turbo-module"
|
|
42
|
+
"presence-verification"
|
|
44
43
|
],
|
|
45
44
|
"repository": {
|
|
46
45
|
"type": "git",
|
|
@@ -73,11 +72,6 @@
|
|
|
73
72
|
"ts-jest": "^29.4.11",
|
|
74
73
|
"typescript": "^5.3.0"
|
|
75
74
|
},
|
|
76
|
-
"codegenConfig": {
|
|
77
|
-
"name": "RNUseSenseSpec",
|
|
78
|
-
"type": "modules",
|
|
79
|
-
"jsSrcsDir": "src"
|
|
80
|
-
},
|
|
81
75
|
"react-native-builder-bob": {
|
|
82
76
|
"source": "src",
|
|
83
77
|
"output": "lib",
|
|
@@ -26,5 +26,8 @@ Pod::Spec.new do |s|
|
|
|
26
26
|
# redaction result type with a completely different UseSenseConfig
|
|
27
27
|
# init signature. See CHANGELOG [2.0.0] for the full rewrite
|
|
28
28
|
# rationale.
|
|
29
|
-
|
|
29
|
+
# 4.6.1 is the floor: earlier 4.6.x tore the runner down on a failed
|
|
30
|
+
# document upload, ejecting the subject mid-flow, and cancelling the
|
|
31
|
+
# scanner or photo picker cancelled the whole verification.
|
|
32
|
+
s.dependency "UseSenseSDK", "~> 4.6.1"
|
|
30
33
|
end
|