iOS Rich Notifications Integration
Attach images, gifs, and videos to your push notifications
Starting with iOS 10, you can attach a static or animated image or even a video to push notifications. It will be displayed right in the notification when the user force-taps it.
Here's an example. iOS rich notifications is action!
![](https://docs.pushwoosh.com/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2F64065bc-PW_rich_push.gif&width=768&dpr=4&quality=100&sign=a8a90970&sv=1)
Enabling this functionality is very simple, with very little coding involved. Let's do it!
1. Creating Notification Service Extension
First create a Notification Service Extension. This extension downloads the content that will be shown to the user.
Add new target to your project (File -> New -> Target) and create Notification Service Extension.
![](https://docs.pushwoosh.com/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2Fb6f3354-Screenshot_9_28_16__3_37_PM.png&width=768&dpr=4&quality=100&sign=156c03f2&sv=1)
Make sure you embed your new extension in your app!
![](https://docs.pushwoosh.com/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2Fa17ee7d-Screenshot_9_28_16__3_39_PM.png&width=768&dpr=4&quality=100&sign=ffc34b7d&sv=1)
2. Notification Service Extension Code
The code is available in our Samples at GitHub: Objective-C, Swift
Just Copy & Paste it to your extension. The code downloads the attachment and calls the notification content handler.
3. Allowing non-secure attachment URL's
Notification Service Extension is a separate binary and has its own Info.plist file. Starting with iOS9 release to download the content from non-https URL (ex: http://) you have to add App Transport Security Settings with Allow Arbitrary Loads flag set to YES to extension's Info.plist file.
![](https://docs.pushwoosh.com/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2F4569dcf-Info_plist.png&width=768&dpr=4&quality=100&sign=35d53432&sv=1)
4. Sending Rich Notification
In order to send a rich notification just specify the file's URL in the "iOS10+ Media attachment" field
![](https://docs.pushwoosh.com/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2F3d1d055-slack-imgs_com.jpg&width=768&dpr=4&quality=100&sign=e3759963&sv=1)
Woosh! Force-tap the notification and you are all done!
![](https://docs.pushwoosh.com/~gitbook/image?url=https%3A%2F%2Ffiles.readme.io%2F3a9249a-PW_rich_push_device.gif&width=768&dpr=4&quality=100&sign=59f5d0a0&sv=1)
Share your feedback with us
Your feedback helps us create a better experience, so we would love to hear from you if you have any issues during the SDK integration process. If you face any difficulties, please do not hesitate to share your thoughts with us via this form.
Last updated