Remote push notification doesn't wake up app

We use remote push notification with content available = 1, as per document it will wake up app, but it doesn't work properly, sometimes the app doesn't wake up.

I have observed this behaviour mostly on iOS 15.

We use this mechanism to send device location to our server.

Why remote push notification doesn't wake up my app all the time?

Replies

The behavior you are seeing is expected, and it is due to content-available (aka "background" or "silent") push notifications being throttled when being delivered to apps that are in the background.

content-available push notifications are never guaranteed to be delivered to the app every single time. Although you may expect up to several content-available push notifications per hour across all apps on a device, it is entirely possible and appropriate that you may receive none at all.

The WWDC 2020 video "Background execution demystified" (https://developer.apple.com/videos/play/wwdc2020/10063/) explains the factors that effect background runtime.

If the only reason you want this is to get the user's location you will want to look at creating a Location Push Service Extension as described here: https://developer.apple.com/documentation/corelocation/cllocationmanager/creating_a_location_push_service_extension

You will need to apply for an entitlement to be able to use this facility here: https://developer.apple.com/contact/request/location-push-service-extension/