docs(messaging): update token registration examples#9102
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the documentation and error messaging for Cloud Messaging token registration. By emphasizing the default auto-registration behavior on iOS and updating references to the modular API, the changes improve clarity for developers and ensure consistency across the codebase. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates documentation, schema descriptions, and iOS error messages to use the new modular API syntax registerDeviceForRemoteMessages(getMessaging()) instead of the legacy namespace syntax. Feedback suggests correcting a minor redundancy and punctuation issue in the schema description.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
mikehardy
left a comment
There was a problem hiding this comment.
This is great, thank you!
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9102 +/- ##
============================================
+ Coverage 58.66% 65.81% +7.15%
- Complexity 1617 1832 +215
============================================
Files 503 497 -6
Lines 39180 38761 -419
Branches 5807 5787 -20
============================================
+ Hits 22981 25505 +2524
+ Misses 14800 11780 -3020
- Partials 1399 1476 +77
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
There is no way this PR could have affected java formatting but that's what failed a moment ago in CI, which is why I'm extra glad I think java formatting flakiness was just fixed with recent merge: ...but there is a real iOS failure which I'm fixing and pushing now, then this can merge (after lint passes) |
Summary
Fixes #8710 by updating the Cloud Messaging token registration guidance to use the modular API consistently.
getToken(messaging)exampleregisterDeviceForRemoteMessages(messaging)call in the device token example and labels it as optional and a no-op if already registeredfirebase.jsonschema description frommessaging().registerDeviceForRemoteMessages()toregisterDeviceForRemoteMessages(getMessaging())Verification
git diff --checknode -e "JSON.parse(require('fs').readFileSync('packages/app/firebase-schema.json','utf8')); console.log('firebase-schema.json ok')"rg -n "messaging\\(\\)\\.registerDeviceForRemoteMessages|messaging\\(\\)\\.getToken|firebase\\.messaging\\(\\)\\.registerDeviceForRemoteMessages" docs/messaging packages/messaging packages/app/firebase-schema.jsonnpx --yes prettier@3.8.3 --check docs/messaging/notifications.mdx packages/app/firebase-schema.jsonNote: I attempted to run a targeted
clang-format --style=Google -n -Werror packages/messaging/ios/RNFBMessaging/RNFBMessagingModule.mmcheck, butclang-formatis not installed in this local environment.