@sendoracloud/sdk-react-native 0.16.2 → 0.17.0

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
@@ -32,19 +32,13 @@ Or use EAS Build for cloud builds. **Auth, analytics, deep links all work fine i
32
32
 
33
33
  ```bash
34
34
  npx expo install @sendoracloud/sdk-react-native @react-native-async-storage/async-storage
35
- npm install react-native-get-random-values
36
35
  ```
37
36
 
38
- `@react-native-async-storage/async-storage` is a required peer dependency — used to persist the anonymous device id across app restarts.
37
+ That's it. Since 0.17.0 the SDK bundles `react-native-get-random-values` as a hard dependency and auto-applies the polyfill at SDK load no manual `import "react-native-get-random-values"` in your entry file required.
39
38
 
40
- `react-native-get-random-values` is a required runtime polyfill Hermes (and JavaScriptCore) doesn't expose `crypto.getRandomValues` reliably, and Sendora refuses to mint anonymous IDs from `Math.random`. Add this as the **first import** in your entry file (`index.js` or `index.tsx`):
39
+ `@react-native-async-storage/async-storage` is a required peer dependency used to persist the anonymous device id across app restarts.
41
40
 
42
- ```ts
43
- // MUST be the first import in your entry file
44
- import "react-native-get-random-values";
45
- ```
46
-
47
- If you forget, `init()` throws with a paste-ready remediation block — it never fails silently.
41
+ > **Upgrading from 0.16.x?** You can delete the `import "react-native-get-random-values";` line from your `index.js` / `index.tsx` entry file — it's now a no-op (the SDK side-effect-loads the polyfill itself). Leaving it in does no harm.
48
42
 
49
43
  ### Optional peers (deep links)
50
44
 
package/dist/index.cjs CHANGED
@@ -42,6 +42,7 @@ __export(index_exports, {
42
42
  getPlayInstallReferrer: () => getPlayInstallReferrer
43
43
  });
44
44
  module.exports = __toCommonJS(index_exports);
45
+ var import_react_native_get_random_values = require("react-native-get-random-values");
45
46
 
46
47
  // src/storage.ts
47
48
  var PREFIX = "sendora_";
package/dist/index.js CHANGED
@@ -1,3 +1,6 @@
1
+ // src/index.ts
2
+ import "react-native-get-random-values";
3
+
1
4
  // src/storage.ts
2
5
  var PREFIX = "sendora_";
3
6
  var asyncStoragePromise = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendoracloud/sdk-react-native",
3
- "version": "0.16.2",
3
+ "version": "0.17.0",
4
4
  "description": "Sendora Cloud React Native + Expo SDK — analytics, identity, push-token registration, auth, deep links (Branch / Firebase Dynamic Links parity). Auth + analytics + deep links work in Expo Go; push token registration requires a Dev Client (EAS Build or `npx expo prebuild`).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -27,6 +27,9 @@
27
27
  "tracking",
28
28
  "customer-engagement"
29
29
  ],
30
+ "dependencies": {
31
+ "react-native-get-random-values": "^1.11.0"
32
+ },
30
33
  "peerDependencies": {
31
34
  "@react-native-async-storage/async-storage": ">=1.17.0",
32
35
  "react-native": ">=0.70.0"