Media Push
Step 1: Create New Target
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.


Step 2: Update Pod File
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.
Step 3: Add Code to the Notification Service Extension Class
Create a new class
NotificationService
that extendsNetmeraNotificationServiceExtension
.Your
NotificationService
class should look like the following:
Step 4: Info.plist Configuration
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.

Troubleshooting
Check Service Extension Target Settings
Ensure the minimum deployment version of your service extension matches or is lower than the device’s iOS version.

Ensure 'Copy only when installing' is Unchecked
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.
Last updated
Was this helpful?