Media Push
Rich Media Integration for Versions 3.14.4 and higher
Last updated
Rich Media Integration for Versions 3.14.4 and higher
Last updated
Starting from Netmera SDK version 3.14.4, it is no longer necessary to include a bridging header file in order to utilize iOS 10 media push features.
Make sure you have Xcode 8 or a higher version installed. If not, upgrade your Xcode installation to use iOS10 media push on your application.
First you should create a new Notification Service Extension to your application. In order to do that, you should Follow those steps:
Open Xcode and navigate to File -> New -> Target
Choose Notification Service Extension
frrom the available options.
Switching Back to Debugging
If you accidentally "Activate", you can return to debugging your app using Xcode, which is located alongside the play button.
Remove the Objective-C Bridging Header file from the project and add:
NetmeraNotificationServiceExtension
in the NotificationService.swift
file.
Link the Netmera.framework
to the Notification Content Extension. Add the Notification Content Extension as a new target in your Podfile by including the following lines,
Warning:
After adding the previous line to your Podfile, pod update
is used.
A new class named "NotificationService" will be created, which should be extended from the NetmeraNotificationServiceExtension
class. Your NotificationService class should look like the following.
To receive HTTP media contents, follow these steps.
Click Info.plist under NotificationService Extension
Add App Transport Security Settings
Under App Transport Security Settings add Allow Arbitrary Loads and set it to YES.
Completed
The integration process for Media Push has been successfully completed, and you are now ready to commence testing and further enhancements.
In the service extension target settings, if the minimum deployment version is set higher than the device's version, it may result in the inability to retrieve images. You may check the following location to see it in XCode.
Check if "Copy only when installing" is turned off for your main target. To do this:
Select your main target.
Go to "Build Phases."
Expand "Embed App Extensions."
Ensure that "Copy only when installing" is NOT checked. If it is checked, please uncheck it.