@sendoracloud/sdk-react-native 0.16.0 → 0.16.2
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 +25 -1
- package/dist/index.cjs +7 -5
- package/dist/index.js +7 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
# @sendoracloud/sdk-react-native
|
|
2
2
|
|
|
3
|
-
Official React Native + Expo SDK for [SendoraCloud](https://sendoracloud.com).
|
|
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
|
+
## 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:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
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
|
|
25
|
+
```
|
|
26
|
+
|
|
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.
|
|
28
|
+
|
|
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.
|
|
30
|
+
|
|
7
31
|
## Install
|
|
8
32
|
|
|
9
33
|
```bash
|
package/dist/index.cjs
CHANGED
|
@@ -1210,8 +1210,9 @@ var Links = class {
|
|
|
1210
1210
|
if (input.channel) body.channel = input.channel;
|
|
1211
1211
|
if (input.tags) body.tags = input.tags;
|
|
1212
1212
|
if (input.expiresAt) body.expiresAt = input.expiresAt;
|
|
1213
|
-
const
|
|
1214
|
-
const
|
|
1213
|
+
const rnPlatform = loadRn()?.Platform.OS;
|
|
1214
|
+
const ios = input.iosBundleId ?? (rnPlatform === "ios" ? this.deps.iosBundleId : void 0);
|
|
1215
|
+
const android = input.androidPackageName ?? (rnPlatform === "android" ? this.deps.androidPackageName : void 0);
|
|
1215
1216
|
if (ios) body.iosBundleId = ios;
|
|
1216
1217
|
if (android) body.androidPackageName = android;
|
|
1217
1218
|
const res = await post(
|
|
@@ -1286,8 +1287,9 @@ var Links = class {
|
|
|
1286
1287
|
const body = {};
|
|
1287
1288
|
if (fingerprintHash) body.fingerprintHash = fingerprintHash;
|
|
1288
1289
|
if (installReferrer) body.installReferrer = installReferrer;
|
|
1289
|
-
const
|
|
1290
|
-
const
|
|
1290
|
+
const rnPlatform = loadRn()?.Platform.OS;
|
|
1291
|
+
const ios = input.iosBundleId ?? (rnPlatform === "ios" ? this.deps.iosBundleId : void 0);
|
|
1292
|
+
const android = input.androidPackageName ?? (rnPlatform === "android" ? this.deps.androidPackageName : void 0);
|
|
1291
1293
|
if (ios) body.iosBundleId = ios;
|
|
1292
1294
|
if (android) body.androidPackageName = android;
|
|
1293
1295
|
const res = await post(
|
|
@@ -1485,7 +1487,7 @@ function installAutoTrack(args) {
|
|
|
1485
1487
|
}
|
|
1486
1488
|
|
|
1487
1489
|
// src/index.ts
|
|
1488
|
-
var SDK_VERSION = "0.16.
|
|
1490
|
+
var SDK_VERSION = "0.16.1";
|
|
1489
1491
|
var DEFAULT_API_URL = "https://api.sendoracloud.com";
|
|
1490
1492
|
var ANON_KEY = "anon_id";
|
|
1491
1493
|
var USER_ID_KEY = "user_id";
|
package/dist/index.js
CHANGED
|
@@ -1165,8 +1165,9 @@ var Links = class {
|
|
|
1165
1165
|
if (input.channel) body.channel = input.channel;
|
|
1166
1166
|
if (input.tags) body.tags = input.tags;
|
|
1167
1167
|
if (input.expiresAt) body.expiresAt = input.expiresAt;
|
|
1168
|
-
const
|
|
1169
|
-
const
|
|
1168
|
+
const rnPlatform = loadRn()?.Platform.OS;
|
|
1169
|
+
const ios = input.iosBundleId ?? (rnPlatform === "ios" ? this.deps.iosBundleId : void 0);
|
|
1170
|
+
const android = input.androidPackageName ?? (rnPlatform === "android" ? this.deps.androidPackageName : void 0);
|
|
1170
1171
|
if (ios) body.iosBundleId = ios;
|
|
1171
1172
|
if (android) body.androidPackageName = android;
|
|
1172
1173
|
const res = await post(
|
|
@@ -1241,8 +1242,9 @@ var Links = class {
|
|
|
1241
1242
|
const body = {};
|
|
1242
1243
|
if (fingerprintHash) body.fingerprintHash = fingerprintHash;
|
|
1243
1244
|
if (installReferrer) body.installReferrer = installReferrer;
|
|
1244
|
-
const
|
|
1245
|
-
const
|
|
1245
|
+
const rnPlatform = loadRn()?.Platform.OS;
|
|
1246
|
+
const ios = input.iosBundleId ?? (rnPlatform === "ios" ? this.deps.iosBundleId : void 0);
|
|
1247
|
+
const android = input.androidPackageName ?? (rnPlatform === "android" ? this.deps.androidPackageName : void 0);
|
|
1246
1248
|
if (ios) body.iosBundleId = ios;
|
|
1247
1249
|
if (android) body.androidPackageName = android;
|
|
1248
1250
|
const res = await post(
|
|
@@ -1440,7 +1442,7 @@ function installAutoTrack(args) {
|
|
|
1440
1442
|
}
|
|
1441
1443
|
|
|
1442
1444
|
// src/index.ts
|
|
1443
|
-
var SDK_VERSION = "0.16.
|
|
1445
|
+
var SDK_VERSION = "0.16.1";
|
|
1444
1446
|
var DEFAULT_API_URL = "https://api.sendoracloud.com";
|
|
1445
1447
|
var ANON_KEY = "anon_id";
|
|
1446
1448
|
var USER_ID_KEY = "user_id";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendoracloud/sdk-react-native",
|
|
3
|
-
"version": "0.16.
|
|
4
|
-
"description": "Sendora Cloud React Native + Expo SDK — analytics, identity, push-token registration, auth, deep links (Branch / Firebase Dynamic Links parity). Expo Go
|
|
3
|
+
"version": "0.16.2",
|
|
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",
|