---
title: UNNotificationAction
framework: usernotifications
role: symbol
role_heading: Class
path: usernotifications/unnotificationaction
---

# UNNotificationAction

A task your app performs in response to a notification that the system delivers.

## Declaration

```swift
class UNNotificationAction
```

## Mentioned in

Declaring your actionable notification types

## Overview

Overview Use UNNotificationAction objects to define the actions that your app can perform in response to a delivered notification. You define the actions that your app supports. For example, a meeting app might define actions for accepting or rejecting a meeting invitation. The action object itself contains the title to display in an action button and the button’s appearance. After creating action objects, add them to a UNNotificationCategory object and register your categories with the system. note: When someone performs a Double Tap gesture while viewing a notification on Apple Watch Series 9 or Apple Watch Ultra 2, the system invokes the first nondestructive action. A nondestructive action doesn’t include the destructive option, and won’t delete user data or change the app irrevocably. For information on how to define actions and categories, see Declaring your actionable notification types. Responding to the Selection of Actions When the user selects one of your actions in response to a notification, the system notifies the delegate of the shared UNUserNotificationCenter object. Specifically, the system calls the userNotificationCenter(_:didReceive:withCompletionHandler:) method of your delegate object. The response object passed to your delegate includes the identifier string of the action the user selects, which you can use to perform the corresponding task. For information on how to handle actions, see Handling notifications and notification-related actions.

## Topics

### Essentials

- [init(identifier:title:options:)](usernotifications/unnotificationaction/init(identifier:title:options:).md)
- [init(identifier:title:options:icon:)](usernotifications/unnotificationaction/init(identifier:title:options:icon:).md)

### Getting Information

- [identifier](usernotifications/unnotificationaction/identifier.md)
- [title](usernotifications/unnotificationaction/title.md)
- [icon](usernotifications/unnotificationaction/icon.md)

### Getting Options

- [options](usernotifications/unnotificationaction/options.md)
- [UNNotificationActionOptions](usernotifications/unnotificationactionoptions.md)

### Initializers

- [init(coder:)](usernotifications/unnotificationaction/init(coder:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [UNTextInputNotificationAction](usernotifications/untextinputnotificationaction.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Notification categories and user actions

- [Declaring your actionable notification types](usernotifications/declaring-your-actionable-notification-types.md)
- [UNNotificationCategory](usernotifications/unnotificationcategory.md)
- [UNTextInputNotificationAction](usernotifications/untextinputnotificationaction.md)
