Skip to content

[firebase_messaging]: iOS 15.x and APNS token has not been set yet. #17188

Open
@petrnymsa

Description

@petrnymsa

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Messaging

Which platforms are affected?

iOS

Description

I've read closed issues but none of them answered what is solution / workaround. Especially quoting:

#11548 (comment)

For me FirebaseMessaging.instance.getAPNSToken(); always returns null and I am using a physical device. Is there a fix for that?

On iOS 18.x real device everything works.
On iOS 15.6 real device I am getting

APNS token has not been set yet. Please ensure the APNS token is available by calling `getAPNSToken()`

even after calling getAPNSToken(). This method returns immediately with null.

Reproducing the issue

Tried to call _fcmInstance.getToken() on iOS 15.6

Firebase Core version

3.10.1

Flutter Version

3.27.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

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