ApplicationRemoteNotificationsHandler
@objc(LwayveApplicationRemoteNotificationsHandler)
public protocol ApplicationRemoteNotificationsHandler : AnyObject
The following methods are available for handling application remote notifications.
-
This method should be called in -application:didFinishLaunchingWithOptions: of the application delegate after the SDK has been initialized.
Declaration
Swift
func handleApplication(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]?)Parameters
applicationThe singleton application object passed through
-application:didFinishLaunchingWithOptions.launchOptionsA dictionary indicating the reason the app was launched (if any) passed through -application:didFinishLaunchingWithOptions:.
-
This method should be called in
-application:didReceiveRemoteNotification:or-application:didReceiveRemoteNotification:fetchCompletionHandlerto handle remote notifications.Declaration
Swift
func handleApplication(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler: @escaping (UIBackgroundFetchResult) -> Void)Parameters
applicationThe singleton app object.
userInfoA dictionary that contains information related to the remote notification.
-
This method should be called in
application(_ application:, didRegisterForRemoteNotificationsWithDeviceToken:)to initialize remote notifications for the experience updates.Declaration
Swift
func handleApplication(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) -
Indicates the state of remote notifications listening. Set to
falseto stop receiving remote notifications.Declaration
Swift
var notificationsActive: Bool { get set }
View on GitHub
ApplicationRemoteNotificationsHandler Protocol Reference