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
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:). |
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:).
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:).
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:).
notification | The instance of UNNotification. |
notification | The instance of UNNotification. |