@sendoracloud/sdk-react-native 0.16.1 → 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
@@ -1,26 +1,44 @@
1
1
  # @sendoracloud/sdk-react-native
2
2
 
3
- Official React Native + Expo SDK for [SendoraCloud](https://sendoracloud.com). Works in Expo Go, managed dev clients, and bare React Native apps.
3
+ Official React Native + Expo SDK for [SendoraCloud](https://sendoracloud.com).
4
4
 
5
5
  > 📖 **First time on React Native?** Read the [5-minute quickstart](https://sendoracloud.com/docs/quickstart-react-native) — it covers the Hermes CSPRNG polyfill, anonymous-first auth, push token receipts, and the demo end-to-end push send.
6
6
 
7
- ## Install
7
+ ## Expo Go vs Dev Client — pick the right runner
8
+
9
+ | Feature | Expo Go (SDK 53+) | Dev Client / EAS Build | Bare RN |
10
+ | --- | --- | --- | --- |
11
+ | Analytics (`track`, `screen`, `identify`) | ✅ | ✅ | ✅ |
12
+ | Auth (`signUp`, `signIn`, MFA, passkeys) | ✅ | ✅ | ✅ |
13
+ | Deep links (warm path) | ✅ | ✅ | ✅ |
14
+ | Deferred deep links (fingerprint) | ✅ | ✅ | ✅ |
15
+ | Deferred deep links (Play Install Referrer) | ❌ — needs `react-native-play-install-referrer` | ✅ | ✅ |
16
+ | **Push token registration** (iOS APNs / FCM) | ❌ — Expo Go dropped remote push in SDK 53 | ✅ | ✅ |
17
+
18
+ **If push notifications matter to you, you MUST move off Expo Go.** Plain Expo Go cannot receive remote push tokens since SDK 53 (Expo deprecated the shared APNs cert). Run a Dev Client instead:
8
19
 
9
20
  ```bash
10
- npx expo install @sendoracloud/sdk-react-native @react-native-async-storage/async-storage
11
- npm install react-native-get-random-values
21
+ # One-time: build the dev client locally
22
+ npx expo prebuild --clean
23
+ npx expo run:ios # or run:android
24
+ # Day-to-day: just `npx expo start` — same DX as Expo Go
12
25
  ```
13
26
 
14
- `@react-native-async-storage/async-storage` is a required peer dependency used to persist the anonymous device id across app restarts.
27
+ Or use EAS Build for cloud builds. **Auth, analytics, deep links all work fine in plain Expo Go** — only push registration requires Dev Client.
15
28
 
16
- `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`):
29
+ > 💡 If `registerPushToken` returns `null` or sign-up succeeds but the dashboard never shows your device token, you're almost certainly on Expo Go. Switch to a Dev Client.
17
30
 
18
- ```ts
19
- // MUST be the first import in your entry file
20
- import "react-native-get-random-values";
31
+ ## Install
32
+
33
+ ```bash
34
+ npx expo install @sendoracloud/sdk-react-native @react-native-async-storage/async-storage
21
35
  ```
22
36
 
23
- If you forget, `init()` throws with a paste-ready remediation blockit never fails silently.
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.
38
+
39
+ `@react-native-async-storage/async-storage` is a required peer dependency used to persist the anonymous device id across app restarts.
40
+
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.
24
42
 
25
43
  ### Optional peers (deep links)
26
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,7 +1,7 @@
1
1
  {
2
2
  "name": "@sendoracloud/sdk-react-native",
3
- "version": "0.16.1",
4
- "description": "Sendora Cloud React Native + Expo SDK — analytics, identity, push-token registration, auth, deep links (Branch / Firebase Dynamic Links parity). Expo Go compatible, no native modules beyond AsyncStorage.",
3
+ "version": "0.17.0",
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",
7
7
  "module": "./dist/index.js",
@@ -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"