You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React Native SDK for [DooPush](https://doopush.com)push notification service. Built with Expo Modules API; works in Expo (managed / prebuild) and bare React Native.
6
+
[DooPush](https://doopush.com)推送通知服务的 React Native SDK。基于 Expo Modules API 实现,可在 Expo(managed / prebuild)和 bare React Native 项目里使用。
-`register()`resolves`{token, deviceId, vendor}` but `deviceId`is currently the empty string on Android (server-side deviceId not yet captured by the bridge — wired up in v0.5.0). The `token`and`vendor`fields are correct.
21
-
-`getDeviceToken()` / `getDeviceId()`always return `null` on Android (no public getter on the underlying SDK yet).
npm install file:../DooPushSDK --install-links #copy SDK (avoid symlink so Metro resolves)
119
-
npx expo run:ios #iOS sim or --device "<device name>"
120
-
npx expo run:android #Android emulator or --device <id>
121
+
npm install file:../DooPushSDK --install-links #用拷贝替代 symlink,避开 Metro 解析坑
122
+
npx expo run:ios #模拟器,或 --device "<设备名>"
123
+
npx expo run:android #模拟器,或 --device <id>
121
124
```
122
125
123
-
The demo lives at `sdk/react-native/DooPushSDKExample/` (peer of the SDK, not nested), keeping the same shape as the iOS / Android native examples in this monorepo.
126
+
详细的真机跑步骤、故障排查、Mac LAN IP 注入等见 `../DooPushSDKExample/README.md`。
└── DooPushSDKExample/ ← 用 SDK 的 demo(与 iOS/Android example 平级)
138
+
```
124
139
125
-
## Coexistence
140
+
## 与第三方共存
126
141
127
-
### With`expo-notifications`
142
+
### 与`expo-notifications`
128
143
129
-
Compatible by default. DooPush owns`UNUserNotificationCenterDelegate`(iOS) but uses delegate-forwarding to keep `expo-notifications`listeners working. On Android, DooPush owns`FirebaseMessagingService`; if you need `expo-notifications`to also receive FCM messages, call (in v0.5.0+):
**Choose one** — both libraries declare `FirebaseMessagingService` and only one wins manifest merger. If you already use `react-native-firebase`, omit the FCM vendor from the DooPush plugin and use `react-native-firebase`'s token API:
-**Fix (iOS)**: Forward APNs delegate callbacks via `ExpoAppDelegateSubscriber`. Without this, on Expo apps the device token never reached `DooPushManager.shared.didRegisterForRemoteNotifications(with:)` and `DooPush.register()` hung forever after the user granted permission. Adds `DooPushAppDelegateSubscriber` registered in `expo-module.config.json`.
155
-
-**Repo hygiene**: removed nested `DooPushSDK/example/` workspace; the demo lives at `sdk/react-native/DooPushSDKExample/` (peer of the SDK), aligning with the iOS / Android example layout.
0 commit comments