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?

It looks like it's is still not fixed in iOS 11b2

I see the same issue -- but only when the app is suspened. Have you found a fix for this.

So this was indeed a bug in iOS 11 and it's now fixed in iOS 11 beta 3. The `application:didReceiveRemoteNotification:fetchCompletionHandler` is now called correctly when a silent push is received both in foreground or in background.

It's still not working for me on iOS 11 beta 3 (15A5318g).


application:didReceiveRemoteNotification:fetchCompletionHandler:


is not called when the app is in background. The same code works on a device with iOS 10.3.2 (14F89). Are there any changes that I should be aware between iOS 10 and iOS 11 regarding this?

Are you sure? No, there aren't any changes in the implementation of silent pushes. Did you set the correct app capabilities?

Yes, as I said the same build works as expected on iOS 10. It also works when I run the app from XCode and send it to background, but otherwise nothing happens if I get a remote notification and the application is sleeping. I will try to configure everything from scratch again, maybe I missed something.

You are right, I see now again the same buggy behaviour :/

Hi, do you know if there is a place to track the progress of this bug. It is happening to us as well where didReceiveRemoteNotification is not getting called on iOS 11. We're testing with beta 4. Please advise. Thanks!

no updates in the bug report. I’ll post back if there is anything

Same for me. Still happening in beta 5. I noticed that it is a bit random. Sometiemes, after restarting the device, the silent push is correctly delivered but then it stops working after a while.


Btw, here is a sample project where the issues is reproduced.

https://www.dropbox.com/s/qdk3dh9irpsmbgi/PushBug11.zip?dl=0


@Jacob.Jiang, yes the @escaping is how the method is defined.

I have the same problem with iOS 11 Beta 7. Same build of my app running on iOS 10 and iOS 11:


iOS 10 - everthing ok

iOS 11 - push messages arrive at thevice (as seen in console) but do not get delivered to application:didReceiveRemoteNotification: if the app is running in foreground

I think I've just found the issue. I had content-available set to true in my push message body but did not have "Remote notifications" enabled for my app in Xcode. This combination seems to not deliver the push message to the app any more. It used to work fine up until iOS 10.

What do you mean by ""Remote notifications" enabled for my app in Xcode" ?

application:didReceiveRemoteNotification:fetchCompletionHandler not called on iOS 11
 
 
Q