Skip to content

CleverTap/notification-examples-ios10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iOS 10 Rich Push Notification Example Projects

push1 push2

Rich push notifications are enabled in iOS 10 via a Notification Service Extension, a separate and distinct binary embedded in your app bundle.

First, enable push notifications in your main app.

Second, create a Notification Service Extension in your project. To do that in your Xcode project, select File -> New -> Target and choose the Notification Service Extension template.

notification service extension

Then, when sending notifications via APNS:

  • include the mutable-content flag in your aps payload (this key must be present in the aps payload or the system will not call your app extension)
  • add custom key:value pair(s) to the payload with the necessary data to construct the download url for the media you want to display (your app extension code will then read these key-value pairs to initiate the media download on the device). Apple supports images, video, audio and gif.

When using the CleverTap Dashboard to send push:

  • select Advanced
  • activate Rich Media
  • add link to the image

clevertap dashboard

See an example Swift project here.

See an example Objective-C project here.

About

Swift and Objc example Notification Service Extension projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages