react-native-usesense 2.3.1 → 2.3.3
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 +37 -9
- package/android/build.gradle +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,9 +63,8 @@ dependency from the public CocoaPods trunk (`UseSenseSDK`, pinned to
|
|
|
63
63
|
### Android setup
|
|
64
64
|
|
|
65
65
|
The native Sense Android SDK is pulled automatically from Maven
|
|
66
|
-
Central (`ai.usesense:sdk
|
|
67
|
-
|
|
68
|
-
needed.
|
|
66
|
+
Central (`ai.usesense:sdk`). `mavenCentral()` is in every Android
|
|
67
|
+
project by default, so no custom repository declaration is needed.
|
|
69
68
|
|
|
70
69
|
Add required permissions to your `AndroidManifest.xml`:
|
|
71
70
|
|
|
@@ -75,15 +74,44 @@ Add required permissions to your `AndroidManifest.xml`:
|
|
|
75
74
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
76
75
|
```
|
|
77
76
|
|
|
78
|
-
|
|
79
|
-
needed
|
|
77
|
+
**Two Gradle settings are required** (auto-linking handles module
|
|
78
|
+
registration, but these are needed for the native SDK to resolve and
|
|
79
|
+
build in release). In your app's `android/build.gradle`:
|
|
80
|
+
|
|
81
|
+
```groovy
|
|
82
|
+
// 1. The native SDK requires Android API 28.
|
|
83
|
+
ext {
|
|
84
|
+
minSdkVersion = 28
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// 2. The SDK is built with Kotlin 2.2; React Native's Kotlin 1.9
|
|
88
|
+
// toolchain can't read 2.2 metadata. Force kotlin-stdlib to a
|
|
89
|
+
// 1.9-readable version. (Not needed once RN ships Kotlin >= 2.2.)
|
|
90
|
+
allprojects {
|
|
91
|
+
configurations.all {
|
|
92
|
+
resolutionStrategy.eachDependency {
|
|
93
|
+
if (requested.group == 'org.jetbrains.kotlin' &&
|
|
94
|
+
requested.name.startsWith('kotlin-stdlib')) {
|
|
95
|
+
useVersion '2.0.21'
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Without these, a release build fails at manifest merge
|
|
103
|
+
(`minSdkVersion … cannot be smaller than 28`) or Kotlin compile
|
|
104
|
+
(`Class 'kotlin.Unit' was compiled with an incompatible version`).
|
|
80
105
|
|
|
81
106
|
### New Architecture
|
|
82
107
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
108
|
+
For projects on the Old Architecture (Bridge), the plugin works
|
|
109
|
+
unchanged — this is the path exercised by the Android release-build CI.
|
|
110
|
+
|
|
111
|
+
> **New Architecture:** the plugin is written to support Turbo Modules,
|
|
112
|
+
> but the Android release-build CI currently validates only the Old
|
|
113
|
+
> Architecture path. If you build with the New Architecture enabled and
|
|
114
|
+
> hit an issue, please file it.
|
|
87
115
|
|
|
88
116
|
## Quick start
|
|
89
117
|
|
package/android/build.gradle
CHANGED
|
@@ -12,7 +12,10 @@ android {
|
|
|
12
12
|
compileSdkVersion safeExtGet('compileSdkVersion', 34)
|
|
13
13
|
|
|
14
14
|
defaultConfig {
|
|
15
|
-
|
|
15
|
+
// 28, matching the native ai.usesense:sdk requirement (minSdk 28 since
|
|
16
|
+
// SDK v4.1). A lower value fails a consuming app's release manifest merge
|
|
17
|
+
// against the SDK's own minSdk. Consuming apps must set minSdkVersion 28.
|
|
18
|
+
minSdkVersion safeExtGet('minSdkVersion', 28)
|
|
16
19
|
targetSdkVersion safeExtGet('targetSdkVersion', 34)
|
|
17
20
|
}
|
|
18
21
|
|
|
@@ -41,7 +44,7 @@ dependencies {
|
|
|
41
44
|
// the iOS SDK 4.3.0 the plugin's podspec depends on). mavenCentral()
|
|
42
45
|
// is already in the `repositories` block above, so no custom
|
|
43
46
|
// repository declaration is needed.
|
|
44
|
-
implementation "ai.usesense:sdk:4.6.
|
|
47
|
+
implementation "ai.usesense:sdk:4.6.3"
|
|
45
48
|
|
|
46
49
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:${safeExtGet('kotlinVersion', '2.0.0')}"
|
|
47
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-usesense",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
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",
|