You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
On iOS, local notifications are not shown in the foreground while using Firebase when setForegroundNotificationPresentationOptions(alert: false) is configured.
To Reproduce
Integrate Firebase into the iOS project.
Configure setForegroundNotificationPresentationOptions(alert: false) in the Firebase messaging setup.
Send a local notification while the app is in the foreground.
Observe that the notification does not appear.
Expected Behavior
The local notification should appear in the foreground even when setForegroundNotificationPresentationOptions(alert: false) is configured, as it should not suppress local notifications.
Sample Code to Reproduce the Problem
FirebaseMessaging.onMessage.listen((RemoteMessage message) { // Handle the incoming notification print("Message received: ${message.notification?.title}"); // Trigger a local notification FlutterLocalNotificationsPlugin().show( 0, message.notification?.title, message.notification?.body, NotificationDetails( iOS: IOSNotificationDetails(), ), ); });
// Firebase configuration FirebaseMessaging.instance.setForegroundNotificationPresentationOptions( alert: false, badge: true, sound: true, );
Additional Context
The issue seems to occur due to the alert: false option suppressing the display of notifications in the foreground, even for local notifications triggered by the app.
The text was updated successfully, but these errors were encountered:
@Evoswork is this something that if my dev team would want to tackle internally we could or does this have something to do with iOS specifically, I am trying to make a decision on using flutter local notifications internally, I just need to be sure it won't become a bottleneck for my team.
@k1ycee@padit69 Note that this issue is not about this package, but about Firebase Cloud Messaging. If using one of their functions interferes with regular notifications, please open an issue on the firebase_messaging package, not this one. You say it should not apply to local notifications, but it's still very possible their code is affecting local notifications.
@Evoswork if you have a code sample that only works in debug and not release, please open a new issue with the code in the description, as well as the setup you've done to ensure permissions are granted, and we can probably help you there.
Describe the bug
On iOS, local notifications are not shown in the foreground while using Firebase when setForegroundNotificationPresentationOptions(alert: false) is configured.
To Reproduce
Integrate Firebase into the iOS project.
Configure setForegroundNotificationPresentationOptions(alert: false) in the Firebase messaging setup.
Send a local notification while the app is in the foreground.
Observe that the notification does not appear.
Expected Behavior
The local notification should appear in the foreground even when setForegroundNotificationPresentationOptions(alert: false) is configured, as it should not suppress local notifications.
Sample Code to Reproduce the Problem
FirebaseMessaging.onMessage.listen((RemoteMessage message) { // Handle the incoming notification print("Message received: ${message.notification?.title}"); // Trigger a local notification FlutterLocalNotificationsPlugin().show( 0, message.notification?.title, message.notification?.body, NotificationDetails( iOS: IOSNotificationDetails(), ), ); });
// Firebase configuration FirebaseMessaging.instance.setForegroundNotificationPresentationOptions( alert: false, badge: true, sound: true, );
Additional Context
The issue seems to occur due to the alert: false option suppressing the display of notifications in the foreground, even for local notifications triggered by the app.
The text was updated successfully, but these errors were encountered: