How iOS 12 Handles Silent Push Notifications
In iOS 12, silent notifications allow background apps to update their content without displaying alerts, playing sounds, or badging app icons to the user. The operating system manages these notifications through a strict combination of user-controlled settings, intelligent power budgeting, and execution time limits. By leveraging background execution triggers while guarding system resources, iOS 12 ensures that data remains fresh while preserving device battery life and performance.
Payload Structure and Delivery Requirements
For an app to receive a silent notification, the push payload sent
through the Apple Push Notification service (APNs) must include the
"content-available": 1 key-value pair within the
aps dictionary. Crucially, the payload must omit
user-facing keys like alert, badge, and
sound.
Additionally, APNs headers must specify an apns-priority
of 5. Setting the priority to 10 is reserved
for notifications intended to alert the user immediately and can lead to
throttling or delivery failure when paired with background-only
payloads.
User Settings and App State Constraints
iOS 12 strictly enforces delivery based on user preferences and current app states:
- Background App Refresh: The global and per-app "Background App Refresh" toggles in iOS Settings must be enabled. If a user turns this feature off, iOS 12 will discard all silent notifications intended for that application.
- Force-Quit State: If the user terminates the app by swiping it away from the App Switcher, iOS 12 enters a lock state for that app. The system will not deliver silent notifications or launch the app in the background until the user manually relaunches the application.
- Low Power Mode: When the device enters Low Power Mode, iOS 12 suspends background fetch operations, deferring or completely halting silent notification processing to conserve battery.
Intelligent Throttling and Power Budgeting
Unlike immediate push notifications, silent notifications in iOS 12 are considered non-guaranteed and advisory. The system uses internal intelligence (managed in part by the device's usage algorithms) to determine the exact moment of delivery:
- Rate Limiting: Apple imposes an undocumented soft limit, generally throttling delivery if a server sends more than two to three silent pushes per hour to a single device.
- Usage Patterns: iOS 12 prioritizes background wakes for apps the user opens frequently. Apps that are rarely used receive fewer wakeups and reduced priority.
- Thermal and Battery Conditions: Under high thermal load or critically low battery, the system delays delivery until conditions improve.
Execution Window and Completion Handling
When iOS 12 delivers a silent push, it temporarily wakes the app in the background and calls the following method in the app delegate:
application(_:didReceiveRemoteNotification:fetchCompletionHandler:)
The app is granted a maximum execution window of 30 seconds to
initiate network requests, download content, and save state. The app
must execute the provided fetchCompletionHandler as soon as
the task finishes, passing the appropriate result
(UIBackgroundFetchResultNewData,
UIBackgroundFetchResultNoData, or
UIBackgroundFetchResultFailed). Failing to call this
completion handler promptly, or taking too long to execute, signals to
iOS 12 that the app is inefficient, resulting in harsher background
execution limits for subsequent silent pushes.