UserNotificationCenterHandling 协议
用于手动处理 iOS 10 及更高版本前台推送通知的代理。
使用此代理,如果您用自定义逻辑实现了UNUserNotificationCenterDelegate协议。 您需要实现所有 UNUserNotificationCenterDelegate 的方法,并在 UserNotificationCenterHandling 中调用相应的方法。
该代理由 userNotificationCenterDelegate 方法实现,属于 AppMetricaPush 类。
Instance methods
|
您应该在 userNotificationCenter(_:willPresent:withCompletionHandler:) 的实现中调用此方法。 |
|
|
您应该在 userNotificationCenter(_:didReceive:withCompletionHandler:) 的实现中调用此方法。 |
|
|
您应该在 userNotificationCenter(_:openSettingsFor:) 的实现中调用此方法。 |
Method descriptions
userNotificationCenterWillPresent(_:)
func userNotificationCenterWillPresent(_ notification: UNNotification?)
您应该在 userNotificationCenter (_: willPresent:withCompletionHandler:) 的实现中调用此方法。
参数:
|
|
UNNotification 的实例。 |
userNotificationCenterDidReceive(_:)
func userNotificationCenterDidReceive(_ response: UNNotificationResponse?)
您应该在 userNotificationCenter (_: didReceive:withCompletionHandler:) 的实现中调用此方法。
参数:
|
|
userNotificationCenterOpenSettings(_:)
func userNotificationCenterOpenSettings(for notification: UNNotification?)
您应该在 userNotificationCenter (_: openSettingsFor:) 的实现中调用此方法。
参数:
|
|
UNNotification 的实例. |