---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
alternate:
  - https://appmetrica.yandex.by/docs/en/sdk/ios/push/swift/UserNotificationCenterDelegate.md
  - https://appmetrica.yandex.by/docs/ru/sdk/ios/push/swift/UserNotificationCenterDelegate.md
  - href: ru/sdk/ios/push/swift/UserNotificationCenterDelegate.md
    type: text/markdown
    title: Markdown version
  - href: ../../../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://appmetrica.yandex.by/docs/ru/llms.txt

# Протокол UserNotificationCenterDelegate

Делегат для обработки foreground push-уведомления на iOS 10 и выше.

Для обработки foreground push-уведомлений, добавьте этот код в методе [application(_:didFinishLaunchingWithOptions:)](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622921-application?language=swift):

```swift translate=no
let delegate = AppMetricaPush.userNotificationCenterDelegate
UNUserNotificationCenter.current().delegate = delegate
```

## Свойства {#property_summary}

#|
|| [presentationOptions](#property_presentationOptions) | Параметры представления push-уведомлений. ||
|| [nextDelegate](#property_nextDelegate) | Делегат, в который передаются вызовы этого протокола. ||
|#

## Описание свойств {#property_detail}

### presentationOptions {#property_presentationOptions}

```swift translate=no
var presentationOptions: UNNotificationPresentationOptions
```

Параметры представления push-уведомлений. Они передаются в обработчик [userNotificationCenter(_:willPresent:withCompletionHandler:)](https://developer.apple.com/documentation/usernotifications/unusernotificationcenterdelegate/1649518-usernotificationcenter?language=swift).

Делегат вызывает обработчик, если свойство `nextDelegate` не установлено или если объект в `nextDelegate` не отвечает.

### nextDelegate {#property_nextDelegate}

```swift translate=no
var nextDelegate: id<UNUserNotificationCenterDelegate>
```

Делегат, в который передаются вызовы этого протокола.
