@humansecurity/expo-mobile-sdk 1.0.6 → 1.0.8

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/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Changelog
2
2
  For Expo wrapper versions
3
3
 
4
+ ## [1.0.8] - 12-11-2025
5
+ ### Moved the AAR out of the wrapper package and added inclusion via the Gradle plugin file; updated docs and plugin setup accordingly.
6
+
7
+ ## [1.0.6] - 25-09-2025
8
+ ### Updated wrapper version to Expo 54 and native sdk version 4.2.0 to include new human_session.
9
+ - Expo version: "^54.0.9"
10
+ - react-native: "0.81.4" - "react": "^19.1.0"
11
+ - iOS SDK version: 4.2.0
12
+ - Android SDK version: 4.2.1 - (built with Kotlin 2.x & Ktor 3.x)
13
+
4
14
  ## [1.0.5] - 09-09-2025
5
15
  ### Updated wrapper version to Expo 53 and native sdk version 4.2.0 to include new human_session.
6
16
  - Expo version: "^53.0.0"
package/README.md CHANGED
@@ -1,17 +1,42 @@
1
1
  # expo-mobile-sdk
2
2
 
3
- A model implementing our native SDK's with the expo framework.
3
+ A module implementing our native SDKs for the Expo framework.
4
4
 
5
5
  # API documentation
6
6
 
7
+ The full Documentation and usage examples can be found at our [official site](https://docs.humansecurity.com/applications-and-accounts/docs/expo-integration).
8
+
7
9
  # Installation in managed Expo projects -
8
10
  From the terminal run:
9
11
 
12
+ ```
13
+ npm install @humansecurity/expo-mobile-sdk
14
+ ```
15
+ Then add the config plugin to your app.json (or app.config.js) so the Android dependency repository is automatically configured:
16
+
17
+ ```
18
+ {
19
+ "expo": {
20
+ "plugins": [
21
+ "@humansecurity/expo-mobile-sdk"
22
+ ]
23
+ }
24
+ }
25
+ ```
26
+
27
+ **Note:**
28
+ The config plugin is available starting from **version 1.0.7 and later**.
29
+ If you are using an earlier version (**1.0.2–1.0.6**), **do not add** the plugin line — simply run:
10
30
  ```
11
31
  npm install @humansecurity/expo-mobile-sdk
12
32
  npx expo prebuild
13
33
  ```
14
34
 
35
+ Finally, run the prebuild command:
36
+ ```
37
+ npx expo prebuild
38
+ ```
39
+
15
40
  ### Usage example
16
41
 
17
42
  ```
@@ -21,7 +46,6 @@ import { HumanSecurity } from '@humansecurity/expo-mobile-sdk';
21
46
  <ThemedText type="title">{HumanSecurity.sdkVersion()}</ThemedText>
22
47
 
23
48
  ```
24
- The full Documentation and usage examples can be found at our [official site](https://docs.humansecurity.com/applications-and-accounts/docs/expo-integration).
25
49
 
26
50
  ### The current API:
27
51
 
@@ -45,6 +69,21 @@ The full Documentation and usage examples can be found at our [official site](ht
45
69
 
46
70
  ```
47
71
 
48
- # Installation in bare React Native projects
72
+ ## Installation in bare React Native projects
49
73
 
50
74
  For the react-native bare workflow projects see our [integration guide](https://docs.humansecurity.com/applications-and-accounts/docs/react-native-integration).
75
+
76
+ ## ⚠️ Note for Custom / Bare Workflows
77
+
78
+ If your project does not use expo prebuild, you must manually add the repository entry to your android/build.gradle file.
79
+ Make sure this block appears in every section where you define repositories:
80
+ ```
81
+ allprojects {
82
+ repositories {
83
+ // ... your existing repos
84
+ maven { url 'https://jfrog.humansecurity.com/artifactory/human-android-sdk/' }
85
+ }
86
+ }
87
+ ```
88
+ The config plugin automatically adds this during expo prebuild,
89
+ but in custom workflows, it must be added manually to ensure proper Android dependency resolution.
@@ -1,7 +1,31 @@
1
+ buildscript {
2
+ // Simple helper that allows the root project to override versions declared by this library.
3
+ ext.safeExtGet = { prop, fallback ->
4
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
5
+ }
6
+ repositories {
7
+ google()
8
+ mavenCentral()
9
+ maven {
10
+ url 'https://jfrog.humansecurity.com/artifactory/human-android-sdk/'
11
+ }
12
+ }
13
+ }
14
+
15
+ allprojects {
16
+ repositories {
17
+ google()
18
+ mavenCentral()
19
+ maven {
20
+ url 'https://jfrog.humansecurity.com/artifactory/human-android-sdk/'
21
+ }
22
+ }
23
+ }
24
+
1
25
  apply plugin: 'com.android.library'
2
26
 
3
27
  group = 'expo.modules.humansdk'
4
- version = '1.0.5'
28
+ version = '1.0.8'
5
29
 
6
30
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
31
  apply from: expoModulesCorePlugin
@@ -16,12 +40,6 @@ def useManagedAndroidSdkVersions = false
16
40
  if (useManagedAndroidSdkVersions) {
17
41
  useDefaultAndroidSdkVersions()
18
42
  } else {
19
- buildscript {
20
- // Simple helper that allows the root project to override versions declared by this library.
21
- ext.safeExtGet = { prop, fallback ->
22
- rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
23
- }
24
- }
25
43
  project.android {
26
44
  compileSdkVersion safeExtGet("compileSdkVersion", 34)
27
45
  defaultConfig {
@@ -32,20 +50,14 @@ if (useManagedAndroidSdkVersions) {
32
50
  }
33
51
 
34
52
  dependencies {
35
- implementation files('libs/HUMAN-4.2.1.aar')
36
- implementation("androidx.core:core-ktx:1.15.0") // any version (select 1.10.1 if your app has 'targetSdkVersion 33')
37
- implementation("androidx.lifecycle:lifecycle-process:2.8.7") // min v2.6.0 (select 2.6.2 if your app has 'targetSdkVersion 33')
38
- implementation("androidx.datastore:datastore-preferences:1.1.1") // any version (select 1.0.0 if your app targets API 33)
39
- implementation("com.google.android.material:material:1.12.0") // min v1.6.0 (select 1.9.0 if your app has 'targetSdkVersion 33')
40
- implementation("com.fasterxml.uuid:java-uuid-generator:4.3.0") // min v3.0.0
41
- implementation("io.ktor:ktor-client-okhttp:3.0.3") // min v3.0.0
53
+ implementation 'com.humansecurity:sdk:4.2.1'
42
54
  }
43
55
 
44
56
  android {
45
57
  namespace "expo.modules.humansdk"
46
58
  defaultConfig {
47
- versionCode 6
48
- versionName "1.0.6"
59
+ versionCode 8
60
+ versionName "1.0.8"
49
61
  }
50
62
  lintOptions {
51
63
  abortOnError false
package/app.plugin.js ADDED
@@ -0,0 +1,54 @@
1
+ // app.plugin.js
2
+ const { withProjectBuildGradle, WarningAggregator } = require('@expo/config-plugins');
3
+
4
+ const REPO_LINE = `maven { url 'https://jfrog.humansecurity.com/artifactory/human-android-sdk/' }`;
5
+ const REPO_MARKER = 'jfrog.humansecurity.com/artifactory/human-android-sdk';
6
+
7
+ function ensureInsideFirstRepositoriesBlock(block) {
8
+ if (block.includes(REPO_MARKER)) return block;
9
+ return block.replace(/repositories\s*\{/, (m) => `${m}\n ${REPO_LINE}`);
10
+ }
11
+
12
+ module.exports = function withHumanRepo(config) {
13
+ return withProjectBuildGradle(config, (cfg) => {
14
+ let src = cfg.modResults.contents;
15
+ const before = src;
16
+
17
+ // 1) buildscript.repositories
18
+ src = src.replace(
19
+ /buildscript\s*\{\s*repositories\s*\{[\s\S]*?\}\s*([\r\n\t ]*dependencies\s*\{[\s\S]*?\}\s*)?\}/m,
20
+ (match) => ensureInsideFirstRepositoriesBlock(match)
21
+ );
22
+
23
+ // 2) allprojects.repositories
24
+ const replacedAll = src.replace(
25
+ /allprojects\s*\{\s*repositories\s*\{[\s\S]*?\}\s*\}/m,
26
+ (match) => ensureInsideFirstRepositoriesBlock(match)
27
+ );
28
+ if (replacedAll !== src) {
29
+ src = replacedAll;
30
+ } else if (!src.includes(REPO_MARKER)) {
31
+ // 3) append minimal block if none present
32
+ src += `
33
+
34
+ allprojects {
35
+ repositories {
36
+ google()
37
+ mavenCentral()
38
+ ${REPO_LINE}
39
+ }
40
+ }
41
+ `;
42
+ }
43
+
44
+ if (src === before) {
45
+ WarningAggregator.addWarningAndroid(
46
+ 'withHumanRepo',
47
+ 'No Gradle repositories block matched; appended minimal allprojects.repositories if repo not found.'
48
+ );
49
+ }
50
+
51
+ cfg.modResults.contents = src;
52
+ return cfg;
53
+ });
54
+ };
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+ </dict>
8
+ </plist>
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "@humansecurity/expo-mobile-sdk",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
+ "expo": {
5
+ "plugins": [
6
+ "./app.plugin.js"
7
+ ]
8
+ },
4
9
  "description": "An Expo module to wrap human native SDK for Expo users.",
5
10
  "main": "build/index.js",
6
11
  "types": "build/index.d.ts",
Binary file