AMPUserNotificationCenterDelegate 协议

用于处理 iOS 10 及更高版本前台推送通知的代理。

要处理前台推送通知,请将此代码添加到 application: didFinishLaunchingWithOptions: 方法中:

[UNUserNotificationCenter currentNotificationCenter].delegate = [AMPAppMetricaPush userNotificationCenterDelegate];

Properties

presentationOptions

用于显示推送通知的参数。

nextDelegate

此协议调用将被代理到的委托。

Property descriptions

presentationOptions

(nonatomic, assign) [UNNotificationPresentationOptions](https://developer.apple.com/documentation/usernotifications/unnotificationpresentationoptions) presentationOptions

显示推送通知的参数。 它们被传递给处理程序 userNotificationCenter: willPresentNotification: withCompletionHandler:。

代理会调用处理程序,如果 nextDelegate 属性未设置,或者如果对象在 nextDelegate 中没有响应选择器。

nextDelegate

(nonatomic, weak, nullable) id<UNUserNotificationCenterDelegate> nextDelegate;

一个代理,用于转发此协议的调用。