[Problem/Question]
Hi,
I have a problem with the implementation of push notifications on ios.
It seems that the iOS app only receives the first push notification, and then it doesn’t receive any other notifications.
On Android, this problem does not occur.
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
_localNotifications.initialize(
const InitializationSettings(
android: AndroidInitializationSettings(NotificationChannel.image),
iOS: DarwinInitializationSettings(
requestAlertPermission: true,
requestBadgePermission: true,
requestSoundPermission: true,
),
),
);
final notification = message.notification;
if (notification != null) {
FlutterLocalNotificationsPlugin().show(
notification.hashCode,
notification.title,
notification.body,
const NotificationDetails(
android: AndroidNotificationDetails(
NotificationChannel.id,
NotificationChannel.name,
priority: Priority.high,
),
iOS: DarwinNotificationDetails(
presentAlert: true,
presentBadge: true,
presentSound: true,
),
),
);
}
});
[SDK Version]
sendbird_sdk: 3.2.8
firebase_core: 2.9.0
firebase_messaging: 14.1.4
firebase_core_platform_interface: 4.6.0
[Frequency]
Always
[Current impact]
ios version of app doesn’t always get notifications