Media Push
Last updated
Was this helpful?
Last updated
Was this helpful?
Ensure you are using Xcode 8 or a higher version.
In Xcode, navigate to File > New > Target.
Select Notification Service Extension from the available options and create the new target.
Switching Back to Debugging
If you accidentally click on "Activate", you can return to debugging your app using Xcode, which is located next to the the play button.
Remove the Objective-C Bridging Header from your project.
Add the following to your Podfile to link the Netmera.framework
to the Notification Content Extension.
Run pod update
to install the dependency.
Warning:
After adding the previous line to your Podfile, pod update
is used.
Create a new class NotificationService
that extends NetmeraNotificationServiceExtension
.
Your NotificationService
class should look like the following:
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.
Allow Arbitrary Loads / Yes allows all HTTP loads:
NSAllowsArbitraryLoads
allows all HTTP loads. This value should be set to true
only if an image URL in HTTP format is being used in push notifications. Otherwise, it is not necessary and might be set as FALSE.
Ensure the minimum deployment version of your service extension matches or is lower than the device’s iOS version.
In Xcode, go to Build Phases and expand Embed App Extensions. Ensure that Copy only when installing is unchecked for your main target.
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.