What is Silent Push Notification? When does the device receive it?

They can be used to inform the application of new content without having the user informed. Instead of displaying a notification alert, the application will be awakened in background (iOS does not automatically launch your app if the user has force-quit it) and application:didReceiveRemoteNotification:fetchCompletionHandler: will be called. You then have the opportunity to process any information transparently for the user :

  • Download some content
  • Synchronize some elements,
  • Inform the user directly within the application when he opens it back

Note that your time is limited to 30s.

To configure silent notifications

To support silent remote notifications, add the remote-notification value to the UIBackgroundModes array in your Info.plist file. To learn more about this array, see UIBackgroundModes.

<key>UIBackgroundModes</key>
<array>
    <string>remote-notification</string>
</array>

Configuring a Silent Notification

The aps dictionary can also contain the content-available property. The content- available property with a value of 1 lets the remote notification act as a silent notification. When a silent notification arrives, iOS wakes up your app in the background so that you can get new data from your server or do background information processing. Users aren’t told about the new or changed information that results from a silent notification, but they can find out about it the next time they open your app.

For a silent notification, take care to ensure there is no alert, sound, or badge payload in the aps dictionary. If you don’t follow this guidance, the incorrectly-configured notification might be throttled and not delivered to the app in the background, and instead of being silent is displayed to the user

Leave a Comment