iOS 10 has introduced rich push notifications which provides the capability to add image, video, audio, or GIF attachments to your push notifications.
Rich push notifications are enabled via a notification service extension, a separate and distinct binary embedded in your app bundle. Prior to displaying a new push notification, the system will call your notification service extension to modify the payload as well as add media attachments to be displayed.
The following section covers how to enable rich push notifications:
- Enable push notifications for your app.
- To create a notification service extension in your project, in Xcode, select File > New > Target.
- Choose the Notification Service Extension template.
- When sending notifications via APNs, include the mutable-content flag in your app payload.
This key must be present in the app payload or the system will not call your app extension.
When using the CleverTap Dashboard to send rich push notifications:
- Select the Advanced checkbox.
- Select the Mutable Content checkbox.
- Add your custom key-value pair(s).
Updated 6 months ago