Open
Description
Is there an existing issue for this?
- I have searched the existing issues.
Which plugins are affected?
Messaging
Which platforms are affected?
iOS
Description
await FirebaseMessaging.instance.getInitialMessage()
is always null when the app is opened from the "killed" state.
The plugin version 15.1.6 (the previous version I used) worked as expected.
iOS 18.3.1
@pragma('vm:entry-point')
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
await Firebase.initializeApp();
RemoteMessage? initialMessage = await FirebaseMessaging.instance.getInitialMessage()
// initialMessage is always null here
}
void main() async {
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
...
}
Reproducing the issue
- Close the app (swipe it away)
- Send a notification via firebase console or with a script (in my case I have a link attached to the notification data)
- Tap the notification
- Observe initialMessage being null
Firebase Core version
3.11.0
Flutter Version
3.27.2
Relevant Log Output
Flutter dependencies
No response
Additional context and comments
No response