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 |
473e3a0 to
31c16f7
Compare
55ea18f to
5b431eb
Compare
09bc9fb to
f86cf42
Compare
7db79f5 to
4de286b
Compare
789d8eb to
02ac81e
Compare
4de286b to
60d24d8
Compare
02ac81e to
9942418
Compare
Three fixes discovered while running the app: - Use Gradle 8.13 (not 8.8) for RN 0.84 compatibility; add troubleshooting note - Declare POST_NOTIFICATIONS in AndroidManifest.xml (was missing) - Use notifee.requestPermission() on Android instead of PermissionsAndroid for consistent behavior across API levels Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Firebase messaging().getToken() returns an FCM token on iOS too — Firebase handles the APNs token exchange internally. Using transportType 'apns' with an FCM token was incorrect. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ove token refresh listener into activatePush. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
60d24d8 to
061e171
Compare
GregHolmes
left a comment
There was a problem hiding this comment.
Looks good! Just a couple comments.
| ```react | ||
| // Generate a unique device ID for this installation | ||
| const [deviceId] = useState( | ||
| `push-tutorial-${Platform.OS}-${Math.random().toString(36).slice(2, 9)}`, |
There was a problem hiding this comment.
Random device ID is a bit fragile, is it worth having an Aside or comment here stating that this is for demo purposes? Otherwise every restart creates a new device registration with Ably, orphaning the previous one.
|
|
||
| ## Step 5: Send push with code <a id="step-5"/> | ||
|
|
||
| You can send push notifications directly from your app using `deviceId`, `clientId`, or channel publishing. Channel publishing does not require the `push-admin` capability. |
There was a problem hiding this comment.
Is this a bit misleading to say channel p ublishing does not require the push-admin capability? Publishing to a channel requires publish capability but the extras.push field in the message payload still requires push rules to be configured on the channel. (stated in prerequisite 4). Just wondering if this will confuse readers into thinking that no special set up is required for push.
| </Code> | ||
|
|
||
| <Aside> | ||
| At the time of writing React Native 0.84's Gradle plugin is not compatible with Gradle 9. If you see a `JvmVendorSpec.IBM_SEMERU` error during the Android build, update `android/gradle/wrapper/gradle-wrapper.properties` to use Gradle 8.13: `distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip`. |
There was a problem hiding this comment.
Mentioning ReactNative 0.84 specifically is likely to result in it being outdated quickly. Is it worth being more general here or noting that this is the RN version at the time of writing this guide?
| ``` | ||
| </Code> | ||
|
|
||
| <Aside> |
There was a problem hiding this comment.
This has no data-type attribute. All asides should. It could just be
Description
React Native web push notifications tutorial.
Checklist