[firebase_messaging]: <Flutter ios device getToken getting unknown error>
Is there an existing issue for this?
- [x] I have searched the existing issues.
Which plugins are affected?
Messaging
Which platforms are affected?
iOS
Description
for the device token im calling FirebaseMessaging.instance.getToken() but im getting error like this on ios platform [firebase_messaging/unknown] An unknown error has occurred.
this actually happend from december 5th onwards, it was working fine but suddenly this happend.
Reproducing the issue
same way getToken calling you will get the error
Firebase Core version
4.2.1
Flutter Version
3.35.3
Relevant Log Output
Flutter dependencies
Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
No response
Hi @Amina-UC-Dev, I'm unable to reproduce this with the firebase_messaging example app. The token is received without errors. Could you run our example app to see if the issue still persist?
I also encountered the same issue. After replacing AppDelegate with SceneDelegate in my iOS project, I am no longer able to obtain the token, although it worked correctly before the replacement. Currently, the workaround is to add application.registerForRemoteNotifications() in didFinishLaunchingWithOptions, but I’m not sure what other issues this might cause. @SelaseKay @Amina-UC-Dev