UserNotificationCenterHandling protocol

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

Use this delegate if you implement the UNUserNotificationCenterDelegate protocol with custom logic. You should implement all methods of UNUserNotificationCenterDelegate and call its corresponding methods in UserNotificationCenterHandling.

This delegate is implemented by the userNotificationCenterDelegate method of the AppMetricaPush class.

Instance methods

userNotificationCenterWillPresent(_:)

You should call this method in your implementation of userNotificationCenter(_:willPresent:withCompletionHandler:).

userNotificationCenterDidReceive(_:)

You should call this method in your implementation of userNotificationCenter(_:didReceive:withCompletionHandler:).

userNotificationCenterOpenSettings(_:)

You should call this method in your implementation of userNotificationCenter(_:openSettingsFor:).

Method descriptions

userNotificationCenterWillPresent(_:)

func userNotificationCenterWillPresent(_ notification: UNNotification?)

You should call this method in your implementation of userNotificationCenter (_: willPresent:withCompletionHandler:).

Parameters:

notification

The instance of UNNotification.

userNotificationCenterDidReceive(_:)

func userNotificationCenterDidReceive(_ response: UNNotificationResponse?)

You should call this method in your implementation of userNotificationCenter (_: didReceive:withCompletionHandler:).

Parameters:

notification

The instance of UNNotificationResponse.

userNotificationCenterOpenSettings(_:)

func userNotificationCenterOpenSettings(for notification: UNNotification?)

You should call this method in your implementation of userNotificationCenter (_: openSettingsFor:).

Parameters:

notification

The instance of UNNotification.