Notification extensions

NotificationServiceExtension

Declared In:
Headers/SNRNotificationServiceExtension.h

Inherits From:
NSObject

Declaration:

class NotificationServiceExtension: BaseModel
@interface SNRNotificationServiceExtension : NSObject

Methods:

This method enables or disables console logs from NotificationServiceExtension.

static func setDebugModeEnabled(_: Bool)
+ (void)setDebugModeEnabled:(BOOL)enabled

This method sets a fallback title and body for notification alert when decryption fails.

static func setDecryptionFallbackNotificationTitleAndBody(title: String, body: String)
+ (void)setDecryptionFallbackNotificationTitle:(nullable NSString *)title andBody:(nullable NSString *)body

This method passes notification for processing by the SDK.

static func didReceiveNotificationExtensionRequest(_: UNNotificationRequest, withMutableNotificationContent: UNMutableNotificationContent)
+ (void)didReceiveNotificationExtensionRequest:(UNNotificationRequest *)request withMutableNotificationContent:(UNMutableNotificationContent *)notificationContent

This method passes notification with additional parameters for processing by the SDK.

This method was introduced in SDK version 4.24.0.

Parameter Default Description
kSNRNotificationServiceExtensionOptionsPushDismissProcessing false Enables tracking push.dismiss when clearing from the notification center
static func didReceiveNotificationExtensionRequest(_: UNNotificationRequest, withMutableNotificationContent: UNMutableNotificationContent, options: [SNRNotificationServiceExtensionOptionsKey: Any]?)
+ (void)didReceiveNotificationExtensionRequest:(UNNotificationRequest *)request withMutableNotificationContent:(UNMutableNotificationContent *)notificationContent options:(nullable NSDictionary<SNRNotificationServiceExtensionOptionsKey, id> *)options

This method passes notification for processing by the SDK when the extension is terminated by the system.

static func serviceExtensionTimeWillExpireRequest(_: UNNotificationRequest, withMutableNotificationContent: UNMutableNotificationContent)
+ (void)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest *)request withMutableNotificationContent:(UNMutableNotificationContent *)notificationContent


SingleMediaNotificationContentExtensionViewController

Declared In:
Headers/SNRSingleMediaContentExtensionViewController.h

Inherits From:
UIViewController

Declaration:

class SingleMediaContentExtensionViewController: UIViewController
@interface SNRSingleMediaContentExtensionViewController : UIViewController

Methods: Sets a notification to generate a view.

func setSyneriseNotification(_: UNNotification)
- (void)setSyneriseNotification:(UNNotification *)notification

Passes a notification response to interact with a view.

func setSyneriseNotificationResponse(_: UNNotificationResponse, completionHandler: ((UNNotificationContentExtensionResponseOption) -> Void))
- (void)setSyneriseNotificationResponse:(UNNotificationResponse *)response completionHandler:(void (^)(UNNotificationContentExtensionResponseOption))completion


CarouselNotificationContentExtensionViewController

Declared In:
Headers/SNRCarouselContentExtensionViewController.h

Inherits From:
UIViewController

Declaration:

class CarouselContentExtensionViewController: UIViewController
@interface SNRCarouselContentExtensionViewController : UIViewController

Methods:

This method sets a notification to generate a view.

func setSyneriseNotification(_: UNNotification)
- (void)setSyneriseNotification:(UNNotification *)notification

This method passes a notification response to interact with a view.

func setSyneriseNotificationResponse(_: UNNotificationResponse, completionHandler: ((UNNotificationContentExtensionResponseOption) -> Void))
- (void)setSyneriseNotificationResponse:(UNNotificationResponse *)response completionHandler:(void (^)(UNNotificationContentExtensionResponseOption))completion

Canonical URL: https://hub.synerise.com/developers/mobile-sdk/class-reference/ios/notification-extensions