UserNotificationCenterDelegate protocol

A delegate for handling foreground push notifications on iOS 10 and higher.

To handle foreground push notifications, add this code to the application(_:didFinishLaunchingWithOptions:) method:

let delegate = AppMetricaPush.userNotificationCenterDelegate
UNUserNotificationCenter.current().delegate = delegate

Properties

presentationOptions

Parameters for displaying push notifications.

nextDelegate

A delegate to which calls of this protocol will be proxied.

Property descriptions

presentationOptions

var presentationOptions: UNNotificationPresentationOptions

Parameters for displaying push notifications. They are passed to the handler userNotificationCenter(_:willPresent:withCompletionHandler:).

The delegate invokes the handler if the nextDelegate property is not set or if the object is in nextDelegate does not respond to the selector.

nextDelegate

var nextDelegate: id<UNUserNotificationCenterDelegate>

A delegate to which calls of this protocol will be proxied.