Has anything changed with data only messages on iOS in version 10? #6303
Replies: 2 comments
-
Seems related to this thread: https://stackoverflow.com/questions/66847242/flutter-fcm-ios-silentdata-only-notification-not-received but this didn't resolve it. |
Beta Was this translation helpful? Give feedback.
-
The issue seems to be related to silent notifications and using SNS to send messages through FCM. When going through FCM directly this structure works properly: {
"to": "{device token here}",
"content_available": true,
"apns-priority": 5,
"data": {
"some-key": "some-value"
}
} However, I haven't yet been able to do that when sending through SNS. I have a work-around, shown below, which does work properly by forcing the message to be handled as a notification without causing a visible notification to the user if the app is in the background. {"GCM":"{\"data\":{\"some-key\":\"some-value\"}, \"notification\":{\"badge\":\"0\"}}"} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm doing a null safety upgrade and as part of it I upgraded to version 10.0.0 of firebase_messaging. After the upgrade I no longer receive data only messages on iOS although they work fine on Android. If I include both the data and a notification section then I receive a message with the correct data. For a data only message I expected to get a callback on the
FirebaseMessaging.onMessage.listen
stream.Beta Was this translation helpful? Give feedback.
All reactions