[Messaging] Add new Registration methods - #1891
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new registration and unregistration mechanism using Firebase Installation IDs (FIDs) to replace the deprecated token-based registration in Firebase Messaging. It adds Register() and Unregister() APIs, introduces OnRegistrationReceived and OnUnregistrationReceived callbacks to the Listener and PollableListener classes, and updates the Android, iOS, and stub implementations accordingly. Two issues were identified in the test code: an unused variable expected_error in integration_test.cc that could trigger compiler warnings, and a logical contradiction in TestUnregistrationClearsCachedRegistration within messaging_test.cc that will cause test failures on the Android desktop stub.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces new registration and unregistration methods using Firebase Installation IDs (FIDs) in the Firebase Messaging C++ SDK, deprecating the older token-based registration methods across Android, iOS, and stub implementations. The changes include updates to the C++ API, JNI bindings, Java services, iOS delegates, and flatbuffer schemas, along with comprehensive integration and unit tests. The review feedback recommends adding defensive null checks in MessageReader::ConsumeRegistrationReceived and MessageReader::ConsumeUnregistrationReceived to prevent potential null pointer dereferences and crashes when processing malformed flatbuffer payloads.
Description
Adds support for the new Messaging registration method, which uses Installation Ids over the old FCM tokens. Note that it is not on by default, and requires setting the appropriate variable in the Android or iOS project.
Testing
Running Android and iOS tests locally
Type of Change
Place an
xthe applicable box:Notes
Release Notessection ofrelease_build_files/readme.md.