use https://api.development.push.apple.com/3/device/98bf6345fc85248dd74eb8a1ac2d18150b5e4299efe5229dd52de7f1c154a33d Push notification was successful, but the phone did not receive the message. What is the reason?
Push notification was successful, but the phone did not receive the message
The phone did receive the message. But your app did not. You are sending background notifications.
Background push notifications are never guaranteed to be delivered to the app every single time.
Notifications sent at low priority (priority 5) are throttled, regardless of payload. Background push notifications are always sent at low priority. Although you may expect up to several background push notifications per hour across all apps on a device, it is entirely possible and appropriate that you may receive none at all.
The purpose of the throttle is to allow background activity for an app in a resource-efficient manner. It also serves to prevent apps from consuming too much of the user’s battery or cellular data with background traffic. Once the device-wide battery or data budgets have been exhausted, no more background push notifications will be delivered until the budgets are reset. The budgets are reset every 24 hours, and this schedule cannot be changed by user or developer action. Additionally, these notifications will not be delivered to the app at all if the user has not launched the app for a while.
The throttle is disabled if you run your app with a debugger attached. This allows you to test that your notifications are being received correctly, but should only be considered a best-case scenario.
The important point is that apps should never be designed expecting that every push notification will be received. This is not how APNs is intended to work; it is intended to inform the user or app that some event of interest has occurred. Apps are expected to work properly, albeit perhaps with degraded functionality, if push notifications are not received. The user can turn off push notifications or background app updates at any time, and of course push notifications will not be received if the device doesn’t have network connectivity. Also, an app will not be woken in the background by a push notification if the app had previously been force-quit. Force quit is considered a drastic choice by the user to say that they do not want the app to run, often because it misbehaved in some unrecoverable manner.
Argun Tekant / DTS Engineer / Core Technologies