Update React Native guide for push notifications plugin#3478
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
75bb1d7 to
11d7732
Compare
11d7732 to
af0cf2b
Compare
Ably JavaScript SDK 2.25.0 adds first-class React Native push support via the ably/react-native-push plugin, replacing the previous workaround of registering devices through the push admin API. The getting-started guide now creates the plugin with app-supplied AsyncStorage and a requestToken callback, activates with push.activate(), reads device state with the new getDevice(), and subscribes channels with channel.push.subscribeDevice(). Adds the guide to the Pub/Sub nav and a React Native example to the device activation page. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
af0cf2b to
1d92a74
Compare
| await saveDeviceRegistration(fcmToken); | ||
|
|
||
| tokenRefreshUnsubscribeRef.current?.(); | ||
| tokenRefreshUnsubscribeRef.current = messaging().onTokenRefresh(async newToken => { |
There was a problem hiding this comment.
how is onTokenRefresh supported with the new plugin? is it worth adding a note somewhere about what happens with tokens are rotated now?
…t Native - Added details on using `push.updateToken()` to sync updated push tokens with Ably when rotated by the platform. - Included examples for React Native setup and API usage.
Description
This pull request updates the React Native push notifications guide to incorporate the new
ably/react-native-pushplugin provided by the Ably JavaScript SDK v2.25.0. The updated guide includes:Additionally, updates include adding the guide to the Pub/Sub navigation and providing a React Native example on the device activation page.
Checklist