IOS9 Push Battery Saver Mode - didReceiveRemoteNotification not called

On iOS9, if iPhone is in battery saving mode, callback

application:didReceiveRemoteNotification:fetchCompletionHandler: 

not called. Instead, I get the following warning in the console

 High Priority Push: com.your-company.app - Battery Saver Mode Enabled 

When using PushKit, it works.

Does anyone else experience this behavior?

Any other workarounds?

+1
source share
1 answer

I believe, unfortunately, that this is the alleged behavior. Documentation of push notifications constantly hedges their reliability. For instance:.

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

Important: Notification delivery is a "best effort", not guaranteed. It is not intended to deliver data to your application, only to notify the user about the availability of new data

There are many conditions under which notifications will not be delivered or delivery will be delayed, and sometimes Apple will combine several notifications and provide only the latter.

PushKit is a more reliable replacement for applications that want to use VOIP features, where using notifications to call a user for a call requires more reliability. That is why it still works in battery saving mode.

As for workarounds, it really depends on what you are trying to accomplish. One of the possibilities is that you can schedule local notifications while your application is running, and they will be more reliable than standard remote ones.

+2
source

Source: https://habr.com/ru/post/989226/


All Articles