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 CHANGED
@@ -89,13 +89,16 @@ Without it, a release build fails at manifest merge
89
89
 
90
90
  ### New Architecture
91
91
 
92
- For projects on the Old Architecture (Bridge), the plugin works
93
- unchanged — this is the path exercised by the Android release-build CI.
94
-
95
- > **New Architecture:** the plugin is written to support Turbo Modules,
96
- > but the Android release-build CI currently validates only the Old
97
- > Architecture path. If you build with the New Architecture enabled and
98
- > hit an issue, please file it.
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
 
@@ -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. Pinned to 4.3.0,
43
- // the release that adds the V4 capture API + Flows runner (matches
44
- // the iOS SDK 4.3.0 the plugin's podspec depends on). mavenCentral()
45
- // is already in the `repositories` block above, so no custom
46
- // repository declaration is needed.
47
- implementation "ai.usesense:sdk:4.6.4"
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
  }
@@ -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(cancelSession:(RCTPromiseResolveBlock)resolve
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(getSdkVersion)
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.4",
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
- s.dependency "UseSenseSDK", "~> 4.6"
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