---
title: UNUserNotificationCenterDelegate
framework: usernotifications
role: symbol
role_heading: Protocol
path: usernotifications/unusernotificationcenterdelegate
---

# UNUserNotificationCenterDelegate

An interface for processing incoming notifications and responding to notification actions.

## Declaration

```swift
protocol UNUserNotificationCenterDelegate : NSObjectProtocol
```

## Overview

Overview Use the methods of the UNUserNotificationCenterDelegate protocol to handle user-selected actions from notifications, and to process notifications that arrive when your app is running in the foreground. After implementing these methods in an object, assign that object to the delegate property of the shared UNUserNotificationCenter object. The user notification center object calls the methods of your delegate at appropriate times. important: You must assign your delegate object to the UNUserNotificationCenter object before your app finishes launching. For example, in an iOS app, you must assign it in the application(_:willFinishLaunchingWithOptions:) or application(_:didFinishLaunchingWithOptions:) method of your app delegate. Assigning a delegate after the system calls these methods might cause you to miss incoming notifications. For information about the shared user notification center object, see UNUserNotificationCenter.

## Topics

### First Steps

- [Handling notifications and notification-related actions](usernotifications/handling-notifications-and-notification-related-actions.md)

### Handling the Selection of Custom Actions

- [userNotificationCenter(_:didReceive:withCompletionHandler:)](usernotifications/unusernotificationcenterdelegate/usernotificationcenter(_:didreceive:withcompletionhandler:).md)

### Receiving Notifications

- [userNotificationCenter(_:willPresent:withCompletionHandler:)](usernotifications/unusernotificationcenterdelegate/usernotificationcenter(_:willpresent:withcompletionhandler:).md)
- [UNNotificationPresentationOptions](usernotifications/unnotificationpresentationoptions.md)

### Displaying Notification Settings

- [userNotificationCenter(_:openSettingsFor:)](usernotifications/unusernotificationcenterdelegate/usernotificationcenter(_:opensettingsfor:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Notification management

- [UNUserNotificationCenter](usernotifications/unusernotificationcenter.md)
- [UNNotificationSettings](usernotifications/unnotificationsettings.md)
