I have enabled background notifications and added content-available
key in my notification payload. This successfully enables background notifications, and didReceiveRemoteNotification
is invoked successfully by the system when the app is in background on iOS versions prior to iOS 11. This method is never invoked on iOS 11 when app is in background. Strangely notification indeed comes through successfully (I can see
a notification alert in the iOS notification centre). When app is in Active
or InActive
states, this method is invoked as expected.
Following is the notification payload that my server (Parse) is sending to the APNs:
{
"aps": {
"alert": {
"action-loc-key": "PCB",
"loc-args": ["ggg", "FG"],
"loc-key":"PC"
},
"badge":38,
"content-available":1,
"sound":"default",
},
"bid":"jH9DniAA3D",
"s":1,
"t":1
}
Note: I can see the following message in my server logs though:
parse-server-push-adapter APNS no qualified connections
I don't think this error has anything to do with it as iOS 11 device is receiving a notification successfully.