Skip to content

[📚] Cloud Messaging getToken() not updated to modular format #8710

@KaiValar

Description

@KaiValar

Hi,
I was migrating my app to v23 and I get a little outdated things on the docs and error message from getToken() modular function:

Due to a myself fault, my app didn't register the device to use Cloud messaging, so getToken() trew this error:

Error: [messaging/unregistered] You must be registered for remote messages before calling getToken, see messaging().registerDeviceForRemoteMessages().

This way of registering is outdated because registerDeviceForRemoteMessages() is a modular function too. And in the docs ( https://rnfirebase.io/messaging/usage#auto-registration-ios ) the way to register is outdated too in the same way, using deprecated namespace methods.

I solved my problem already, but I wanted to put my sand grain to support the project :)

Thanks and happy coding!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions