I have an app that registers itself to be woken up in the background when an APNS notification is received (i.e., the remote-notification
setting for UIBackgroundModes
). In the vast majority of cases this works fine. An APNS notification comes in, the app is woken up and a call to my app delegate's application:didReceiveRemoteNotification:fetchCompletionHandler:
is made.
In some cases the APNS is received by the user but the app never gets woken up. It seems to only happen when the device has been inactive for a while (overnight, left behind for a weekend, etc). Once the user launches the app then everything is back to normal and subsequent APNS notifications again trigger the background wake-up.
Does anybody have an idea about what could trigger this?