1

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.

asad
  • 281
  • 4
  • 11
  • Possible duplicate of [Silent pushes not delivered to the app on iOS 11](https://stackoverflow.com/questions/44796613/silent-pushes-not-delivered-to-the-app-on-ios-11). Make sure you have the latest iOS version installed. Though you may be on latest and still have a problem but it sounds like you only have this problem when you're on iOS 11 and iOS 10 doesn't have this issue – mfaani Oct 31 '17 at 02:33
  • yes I think I made it very clear that it only happens on iOS 11 and not on any prior versions. – asad Oct 31 '17 at 02:57
  • @ColeXia which code do you want? didReceiveRemoteNotification is the standard SDK method in AppDelegate class. It is suppose to be called by the system as soon a notification is received. – asad Oct 31 '17 at 03:20
  • This depends entirely on if your using the latest 'LocalNofications' sdk or not, didRecieveRemoteNotification is only called in appdelegate if your using the older method and/or have not assigned a delegate to the UILocalNotifications object. – JoeTomks Oct 31 '17 at 08:57
  • @asad i have same problem, have you find any solution for this? – Yogendra Patel Jul 11 '19 at 04:38

0 Answers0