Carousel, Slider and Thumbnail Push
Warning:
You should build your application with Xcode 8 or higher to use iOS10 media push on your application.
Step 1: Create New Target
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 Content Extension to your application. In order to do that, you should Follow those steps:
Open Xcode and navigate to File -> New -> Target
Choose
Notification Content Extension
frrom the available options.
After you selected Notification Content Extension new class named NotificationViewController will be created. It should be extended from
NetmeraNotificationContentExtension
class.
Switching Back to Debugging
If you accidentally "Activate", you can return to debugging your app using Xcode, which is located alongside the play button.
Step 2: Add your Project to Pod File
Remove the Objective-C Bridging Header file from the project and add:
NetmeraNotificationContentExtension
in the NotificationContent.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.
Step 3: Add Codes to Notification Service Extension Class
A new class named "NotificationContent" will be created, which should be extended from the NetmeraNotificationContentExtension
class. Your NotificationContent class should look like the following.
Step 4: Info.plist Configuration
To configure the Info.plist file for the content extension and enable App Groups, follow these steps:
Make sure the info.plist file under the content extension looks like this.
Delete Label in
MainInterface
Enable App Groups for both your application and the NotificationContent extension in the Capabilities settings of your project. Then add "group.com.yourcompany.carousel" to your app groups.
Once you have added the app groups to your app, you need to specify the app group name in the app delegate method where you set the
Netmera.start()
method. Use the following code as an example,
Completed
The integration process for Carousel, Slider, and Thumbnail Push has been successfully completed, and you are now ready to commence testing and further enhancements.
Last updated