---
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: en/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/en/llms.txt

# UserNotificationCenterDelegate protocol

A delegate for handling foreground push notifications on iOS 10 and higher.

To handle foreground push notifications, add this code to the [application(_:didFinishLaunchingWithOptions:)](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622921-application?language=swift) method:

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

## Properties {#property_summary}

#|
|| [presentationOptions](#property_presentationOptions) | Parameters for displaying push notifications. ||
|| [nextDelegate](#property_nextDelegate) | A delegate to which calls of this protocol will be proxied. ||
|#

## Property descriptions {#property_detail}

### presentationOptions {#property_presentationOptions}

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

Parameters for displaying push notifications. They are passed to the handler [userNotificationCenter(_:willPresent:withCompletionHandler:)](https://developer.apple.com/documentation/usernotifications/unusernotificationcenterdelegate/1649518-usernotificationcenter?language=swift).

The delegate invokes the handler if the `nextDelegate` property is not set or if the object is in `nextDelegate` does not respond to the selector.

### nextDelegate {#property_nextDelegate}

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

A delegate to which calls of this protocol will be proxied.
