YMPUserNotificationCenterHandling Class

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 proper methods in YMPUserNotificationCenterHandling.

The implementation of this delegate is provided by the YMPYandexMetricaPush.userNotificationCenterDelegate method.

Instance methods

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.

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.

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.

notification

The instance of UNNotification.