Is there an existing issue for this?
Are you aware of the differences between iOS and Android background message handling?
Do you have an active Apple Developer account?
Are you using a physical iOS device to test background messages?
Have you enabled "Remote Notifications" & "Background Mode" (Checking options for "Background Processing" & "Remote Notifications") in your app's Xcode project?
Problem
When the app is in background or terminated, FCM notifications are received but not shown in the app when it opens. Messages received while the app was closed are not available in the app.
Current Behavior
Background/terminated: Notifications are received and saved via _firebaseMessagingBackgroundHandler
App opens: No code retrieves the initial message using FirebaseMessaging.instance.getInitialMessage()
Result: Messages received while app was closed are not displayed
Expected Behavior
When app opens from terminated state, check for initial message using getInitialMessage()
Display messages received in background/terminated state in the app
Process notifications that arrived while app was closed
Code References
Background handler saves notifications:
main.dartLines ``
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async { // ... saves notifications to device storage}
Foreground listener handles active app messages:
main.dartLines 509-583
void setupForegroundMessageListener() { FirebaseMessaging.onMessage.listen((RemoteMessage message) async { // ... handles foreground messages });}
Technical Details
Firebase Core: ^4.3.0
Firebase Messaging: ^16.1.0
Platforms: Android & iOS
Have you created an APNs key in your Apple Developer account & uploaded this APNs key to your Firebase console?
yes uploaded
Have you disabled method swizzling for Firebase in your app?
Are you sending messages to your app from the Firebase Admin SDK?
{
"action": "ring",
"result": "ok",
"mac": ":F78:xx:0xx0:05:03",
"ip": "192.1x.x.x",
"img": "data:imag
}
Have you requested permission from the user to receive notifications?
Have you used the 'Console' application on your macOS device to check if the iOS device's system is throttling your background messages?
no
Additional context and comments
No response
Is there an existing issue for this?
Are you aware of the differences between iOS and Android background message handling?
Do you have an active Apple Developer account?
Are you using a physical iOS device to test background messages?
Have you enabled "Remote Notifications" & "Background Mode" (Checking options for "Background Processing" & "Remote Notifications") in your app's Xcode project?
Problem
When the app is in background or terminated, FCM notifications are received but not shown in the app when it opens. Messages received while the app was closed are not available in the app.
Current Behavior
Background/terminated: Notifications are received and saved via _firebaseMessagingBackgroundHandler
App opens: No code retrieves the initial message using FirebaseMessaging.instance.getInitialMessage()
Result: Messages received while app was closed are not displayed
Expected Behavior
When app opens from terminated state, check for initial message using getInitialMessage()
Display messages received in background/terminated state in the app
Process notifications that arrived while app was closed
Code References
Background handler saves notifications:
main.dartLines ``
Technical Details
Firebase Core: ^4.3.0
Firebase Messaging: ^16.1.0
Platforms: Android & iOS
Have you created an APNs key in your Apple Developer account & uploaded this APNs key to your Firebase console?
yes uploaded
Have you disabled method swizzling for Firebase in your app?
Are you sending messages to your app from the Firebase Admin SDK?
{
"action": "ring",
"result": "ok",
"mac": ":F78:xx:0xx0:05:03",
"ip": "192.1x.x.x",
"img": "data:imag
}
Have you requested permission from the user to receive notifications?
Have you used the 'Console' application on your macOS device to check if the iOS device's system is throttling your background messages?
no
Additional context and comments
No response