I'm using flutter dependancies:
firebase_messaging: ^7.0.3
flutter_local_notifications: ^3.0.1+6
I send firebase cloud message like this:
{
"to": "/topics/demo_ios"
"notification" : {
"body" : "Hi there now now",
"title" : "Wow!",
"sound": "default"
},
"priority": "high"
"data": {
"title": "Hi there yes",
"body": "Wow",
}
}
In ios the notification shows when the app is in the foreground, however when in the background it doesn't show at all. I tried reading and fixing many things, but is still doesn't work. I set background fetch, remote notificaitons, and background processing from xcode, and it still doesn't work.
I set FirebaseAppDelegateProxyEnabled to false in the plist file, but it didn't help.
I request permission:
_messaging.requestNotificationPermissions(
const IosNotificationSettings(sound: true, badge: true, alert: true, provisional: false)
);
_messaging.onIosSettingsRegistered.listen((event) {print('2124: ios Setting registered');});