application:didReceiveRemoteNotification:fetchCompletionHandler not called on iOS 11

Hi,

I'm relying in the UIApplicationDelegate method "application:didReceiveRemoteNotification:fetchCompletionHandler" to receive some silent notifications when the application is not in the foreground.


With iOS 11 beta 1, this method is no longer called when I send this push payload


{
  "aps": {
    "content-available": 1
  },
  "mydata": {
    "foo": "bar"
  }
}



- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
}


Did anybody else noticed this behaviour?

Replies

They gave me the same explanation. The problem is that this goes against their own documentation.


From Apple's documentation found here (emphasis are mine): https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html


Using Push Notifications to Initiate a Download

If your server sends push notifications to a user’s device when new content is available for your app, ***you can ask the system to run your app in the background so that it can begin downloading the new content right away***. The intent of this background mode is to minimize the amount of time that elapses between when a user sees a push notification and when your app is able to able to display the associated content. ***Apps are typically woken up at roughly the same time that the user sees the notification*** but that still gives you more time than you might have otherwise.

I am having the same issue with ios11 beta 10. Notifications simply stopped being handled at some moment. Rebooting the device seems to be fixing the problem.

Exactly. I pointed Apple to their own documentation and told them that the new behaviour completely breaks the usage of data pushes. I also see that the silent push is randomly not delivered even of the app is in foreground.

The worst part is that I'm testing this with an app that has background capabiltiies. I'm sendind the push while the app is RUNNING in the background playing music. Even in these circumstances, the push is not delivered.


Today, one of my test devices stopped receiving all silent pushes. No matter if it was on the foreground or background. It wouldn't receive it when executed through Xcode or normal manual launch.

apple is being arrogant about this bug. really disapointing

A bit indeed. Especially that I opened the bug since beta 1 and for me it is an obvious bug. This is a feature that is clearly documented but does not behaves as expected.

Today (just like yesterday when I posted here) my app stopped receiving notifications entirely. Even in the foreground the system would not deliver any notifications to my app. If this is not a bug, I really don't know what a bug is.

I collected all the data that I could. Timestamp of each notification sent. Logs, sysdiagnose with Continuity Debugging enabled. Everything. I've attached it all to the radar that I've opened. Now let's hope someone at Apple (that is willing to fix this) sees this.

Thanks for doing that. I did the same. I even linked to this topic in my rdar.

One thing I just realized after inspecting the Console logs is that although it prints "Did deliver 1 notifications", my app never gets notified. Is this happening with you too?

Update: Even after rebooting the device my app all of the sudden stopped handling the notifications. Both in background as well as in the foreground.

Update: My Apple bug report was closed and marked as duplicate of

33278611
which remains open.

Wow.. this is still not working in iOS 11 GM.

I hope this is not part of the public iOS 11 release next week...

So iOS 11 is released and it seems to be the same build number as the GM. In other words, it’s still not fixed which makes the silent pushes unusable on iOS 11

Any news?

Our app requires this event and it works fine in previous IOS10 etc. We are really disappointed that Apple is not addressing this important issue for many apps.


Please let me know what we can do to get Apple to provide a status on this important issue.