Using Carousel/Slider and Thumbnail Push

This SDK is developed using the Swift programming language. Unlike our existing iOS SDK, we provide integration support with Swift Package Manager (SPM). You can take advantage of Swift's expressive and intuitive nature, enabling you to create sophisticated applications with ease.

  1. Create a new Notification Content Extension to your application. In order to do that, follow these steps:

  • On Xcode click File -> New -> Target and choose Notification Content Extension.

  • New class named NotificationViewController will be created. It should be extended from NetmeraNotificationContentExtension class.

Your NotificationContent class should look like the following:

import UserNotifications
import UserNotificationsUI
import NetmeraNotificationContentExtension

class NotificationViewController: NotificationContentExtension {
  override func viewDidLoad() {
    super.viewDidLoad()
  }

  override func didReceive(_ notification: UNNotification) {
    super.didReceive(notification)
  }
}
  • If you want to add slide to Carousel property, UserInteractionEnabled must be added.

  • After that enable App Groups from the Capabilities for both of your application and NotificationContent extension.

  • Add "bundle_identifier.group_name" to your app groups.

  • Ensure you added the app groups to your app, you should provide in Netmera.start() in your app group name in app delegate method where you set Netmera.start() method as the following:

import UserNotifications
import UserNotificationsUI
import NetmeraNotificationContentExtension

class NotificationViewController: NotificationContentExtension {
  override func viewDidLoad() {
    super.viewDidLoad()
  }

  override func didReceive(_ notification: UNNotification) {
    super.didReceive(notification)
  }
}
  1. In your pod file, you should add NetmeraNotificationContentExtension and install to your extension target like this.

pod "NetmeraNotificationContentExtension"

Default label in MainInterface should be deleted.

If you want to allow your application to receive http media contents:

  • Click Info.plist under NotificationService Extension

  • Add App Transport Security Settings

  • Under App Transport Security Settings add Allow Arbitrary Loads and set it YES.

Last updated