---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.4
alternate:
  - https://appmetrica.yandex.com/docs/en/sdk/ios/push/objectivec/AMPUserNotificationCenterDelegate.md
  - https://appmetrica.yandex.com/docs/ru/sdk/ios/push/objectivec/AMPUserNotificationCenterDelegate.md
  - https://appmetrica.yandex.com/docs/zh/sdk/ios/push/objectivec/AMPUserNotificationCenterDelegate.md
  - href: https://appmetrica.yandex.com/docs/zh/sdk/ios/push/objectivec/AMPUserNotificationCenterDelegate.md
    type: text/markdown
    title: Markdown version
  - href: https://appmetrica.yandex.com/docs/zh/llms.txt?revision=r21698989
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://appmetrica.yandex.com/docs/zh/llms.txt?revision=r21698989

# AMPUserNotificationCenterDelegate 协议

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

要处理前台推送通知，请将此代码添加到 [application: didFinishLaunchingWithOptions:](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622921-application?language=objc) 方法中：

```objectivec translate=no
[UNUserNotificationCenter currentNotificationCenter].delegate = [AMPAppMetricaPush userNotificationCenterDelegate];
```

## Properties {#property_summary}

#|
|| [presentationOptions](#property_presentationOptions) | 用于显示推送通知的参数。 ||
|| [nextDelegate](#property_nextDelegate) | 此协议调用将被代理到的委托。 ||
|#

## Property descriptions {#property_detail}

### presentationOptions {#property_presentationOptions}

```objectivec translate=no
(nonatomic, assign) [UNNotificationPresentationOptions](https://developer.apple.com/documentation/usernotifications/unnotificationpresentationoptions) presentationOptions
```

显示推送通知的参数。 它们被传递给处理程序 [userNotificationCenter: willPresentNotification: withCompletionHandler:](https://developer.apple.com/documentation/usernotifications/unusernotificationcenterdelegate/1649518-usernotificationcenter?language=objc)。

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

### nextDelegate {#property_nextDelegate}

```objectivec translate=no
(nonatomic, weak, nullable) id<UNUserNotificationCenterDelegate> nextDelegate;
```

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