Notification Delegate
Overview
A delegate to handle events from Synerise notifications.
- If your app doesn’t have the notifications service extension implemented, implement it according to the Synerise Notification Service Extension section.
- To handle “dismiss” and “click” events: set the delegate in the application by using the
Synerise.setNotificationDelegate(_:)
method. - To handle “receive” events: set the delegate in the notification service extension by using the
NotificationServiceExtension.setNotificationDelegate(_:)
method.
Declaration
Declared In
SNRSynerise.h
Declaration
NS_SWIFT_NAME(NotificationDelegate)
@protocol SNRNotificationDelegate
Methods
This method is called when a Synerise notification is received.
snr_notificationDidReceive(notificationInfo: NotificationInfo)
Parameter | Type | Description |
---|---|---|
notificationInfo | NotificationInfo |
Object providing info about the notification. |
This method is called when a Synerise notification is dismissed.
func snr_notificationDidDissmis(notificationInfo: NotificationInfo)
Parameter | Type | Description |
---|---|---|
notificationInfo | NotificationInfo |
Object providing info about the notification. |
This method is called when a Synerise notification is clicked.
func snr_notificationClicked(notificationInfo: NotificationInfo)
Parameter | Type | Description |
---|---|---|
notificationInfo | NotificationInfo |
Object providing info about the notification. |
This method is called when an action button is clicked in a Synerise notification.
func snr_notificationClicked(notificationInfo: NotificationInfo, actionButton: String)
Parameter | Type | Description |
---|---|---|
notificationInfo | NotificationInfo |
Object providing info about the notification. |
actionButton | String |
Text of the clicked action button. |