IOS9 Push Battery Saver Mode - didReceiveRemoteNotification not called

馋奶兔 提交于 2019-12-02 05:18:02

I believe, unfortunately, that this is the intended behavior. The documentation about push notifications constantly hedges their reliability. E.g.:

https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html

Important: Delivery of notifications is a “best effort”, not guaranteed. It is not intended to deliver data to your app, only to notify the user that there is new data available

There are a lot of conditions under which notifications won't be delivered or delivery will be delayed, and sometimes Apple will coalesce multiple notifications and only deliver the last one.

PushKit is a more reliable replacement for applications that want VOIP functionality, where using a notification to ring the user for a call needs better reliability. That's why it's still working in battery-save mode.

In terms of workarounds, it really depends what you're trying to accomplish. One possibility is you can schedule local notifications while your app is running, and those will be more reliable than the standard remote ones.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!