Skip to content

[firebase_messaging]: iPhone 17 Simulator (iOS 26) - APNS token has not been set yet. #17729

@RaadShariat

Description

@RaadShariat

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Messaging

Which platforms are affected?

iOS

Description

When using the iPhone 17 simulator (e.g. iPhone 17 Pro Max) with iOS 26, I get the error below, which indicates that the APNS token is null. This issue only happens in this environment and doesn't occur with previous iOS simulator versions. Since I don't have access to a physical iPhone 17, I can't confirm if this actually happens on a real device. I've also searched for previous issues and saw that this can happen on some specific iOS devices, but implementing the suggested solutions and workarounds didn't solve the issue.

Reproducing the issue

Run any example project that uses Firebase Messaging on an iPhone 17 simulator and try calling the getToken() method.

Firebase Core version

4.1.1

Flutter Version

3.35.3

Relevant Log Output

flutter: [firebase_messaging/apns-token-not-set] APNS token has not been set yet. Please ensure the APNS token is available by calling `getAPNSToken()`.
flutter: #0      MethodChannelFirebaseMessaging._APNSTokenCheck (package:firebase_messaging_platform_interface/src/method_channel/method_channel_messaging.dart:138:9)
method_channel_messaging.dart:138
flutter: <asynchronous suspension>
flutter: #1      MethodChannelFirebaseMessaging.getToken (package:firebase_messaging_platform_interface/src/method_channel/method_channel_messaging.dart:244:5)
method_channel_messaging.dart:244

Flutter dependencies

No response

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions