SDK Delegates
We recommend including all SDK delegates within your application's AppDelegate
class to ensure proper handling of all events.
SDK Lifecycle Delegates
These delegates can be implemented to observe SDK loading and exiting.
You must inform the SDK what class is going to implement this protocol. This can be done using the setSDKLifecycleDelegate
method on the SDK:
The following SDK Lifecycle delegates are available:
Finished Loading
This delegate is called when the SDK finishes its initialization and is ready for interaction.
Permission Lifecycle Delegates
These delegates can be implemented to observe a user's permission authorization changes.
You must inform the SDK what class is going to implement this protocol. This can be done using the setPermissionLifecycleDelegate
method on the SDK:
The following Permission Lifecycle delegates are available:
Permission Status Changed
This delegate is called when a user's permission status/authorization has changed.
The status
variable represents the user's new permission status using the UNAuthorizationStatus enum.
Notification Lifecycle Delegates
These delegates can be implemented to observe events like impressions, opens, and other interactions with notifications.
You must inform the SDK what class is going to implement this protocol. This can be done using the setNotificationLifecycleDelegate
method on the SDK:
The following Notification Lifecycle delegates are available:
Notification Received
This delegate is called when a user receives a notification
Notification Opened With URI/URL Destination
This delegate is called when a notification is opened that has a landing URL attached. The subscriber should be navigated to the view that represents the URL.
This method expects a Boolean response. If the response is true
then the SDK will perform no navigation action for this notification open. If the response is false
then the SDK will attempt to navigate the subscriber to the destination URL by using the open
method.
See the Deep Linking documentation for a complete example.
App Message Lifecycle Delegates
These delegates can be implemented to observe events like impressions, opens, and other interactions with app messages.
You must inform the SDK what class is going to implement this protocol. This can be done using the setAppMessageLifecycleDelegate
method on the SDK:
The following App Message Lifecycle delegates are available:
App Message Will Present
This delegate is called when an App Message is presented to a user.
App Message Received User Interaction
This delegate is called when a user interacts with an App Message.
This method expects a Boolean response. If the response is true
then the SDK will not handle the interaction or attempt to perform navigation when the interaction is an Open URL action. If the response is false
then the SDK will process the interaction and if the interaction is an Open URL action will attempt to navigate the user to the destination URL by using the open
method.
Last updated