Firebase FCM silent push notifications for iOS
Remove "notification" key value pair and add "content_available": true
It will look like this
{
"to" : "...",
"priority": "high",
"content_available": true,
"data" : {
....
}
}
This should make it a silent APNS and you need to handle with corresponding APNS delegate methods.
You will need to handle this through delegates Refer this firebase documentation for details: https://firebase.google.com/docs/cloud-messaging/concept-options
I found an workaround. I put an empty value for "sound" in "notification" field and the silent notifications are delivered even when the application is in background.
{
"to" : "...",
"priority": "high",
"notification": {
"sound": ""
},
"data" : {
....
}
}
My hunch is that Apple does not allow silent notifications with a 'high' priority and somehow "notification": {"sound": ""} tricks the APNS that this notification is not a silent one.