Silent Notifications for iOS Apps
Send silent notifications for your iOS Apps using iZooto SDK. Available for all frameworks.
You can send silent notifications for your iOS app (built using Native, Flutter, or React Native) after adding the iZooto SDK. The process is simple and involves sending a key: value
pair in the Additional Data
section of the Send Notification page.
Additionally, add the below code snippet to the AppDelegate
class. This is needed for tracking:
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
print("Silent push received: \(userInfo)")
}
Once you pass the above key: value
pair along with your notification payload and add the above code, our system will convert the notification to a silent notification, which means that the notification will be received without any sound, alert, or badge.
Silent push notifications are a powerful feature for background tasks, but they come with several
limitations and considerations:
Delivery Limitations
- Not Guaranteed: Silent pushes are not guaranteed to be delivered. They are subject to
network conditions and Apple’s push notification service (APNs) may throttle or drop
them if there are too many. - Throttling: APNs may throttle the delivery of silent push notifications if they are sent too
frequently or in large volumes.
Background Execution Time
- Limited Execution Time: When a silent push is received, the app has a limited amount
of time to complete any background tasks before being suspended again. This time is
typically around 30 seconds.
Battery Impact
- Battery Usage: Frequent silent pushes can impact battery life as they may cause
background activity and data fetching. It’s essential to use silent pushes judiciously to
avoid excessive battery consumption.
Payload Size
- Payload Size Limit: The payload for push notifications, including silent pushes, is
limited to 4 KB. If you exceed this limit, your notification may not be delivered.
Background Fetch Mode
- Background Modes Required: For silent pushes to work, your app must have the
appropriate background modes enabled in its capabilities, such as "Background Fetch"
and "Remote Notifications".
User Interaction
- No User Interaction: Silent notifications don’t show alerts, sounds, or badges, so they
don’t provide any direct feedback to the user. This makes it suitable for background
tasks but not for user-facing notifications.
App State
- App Must Be Installed: Silent pushes only work if the app is installed on the device. If
the app is uninstalled, the push notification will not be delivered. - Background/Inactive State: Silent pushes can only wake the app if it is in the
background or suspended. They do not trigger while the app is in the foreground.
Network Constraints
- Network Dependency: Silent pushes rely on network availability. If the device is offline
or in airplane mode, silent pushes will not be delivered.
User Notifications Settings
- User Settings: If the user has disabled notifications for your app entirely, silent pushes
may not work as intended. Ensure that users have allowed notifications if you rely on
them.
Updated 27 days ago