<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.14.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UserNotifications",
  "identifier" : "/documentation/UserNotifications/UNNotificationAction",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "User Notifications"
    ],
    "preciseIdentifier" : "c:objc(cs)UNNotificationAction"
  },
  "title" : "UNNotificationAction"
}
-->

# UNNotificationAction

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

```
class UNNotificationAction
```

## Overview

Use [`UNNotificationAction`](/documentation/UserNotifications/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`](/documentation/UserNotifications/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 ``doc://com.apple.usernotifications/documentation/UserNotifications/UNNotificationActionOptions/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](/documentation/UserNotifications/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`](/documentation/UserNotifications/UNUserNotificationCenter) object. Specifically, the system calls the [`userNotificationCenter(_:didReceive:withCompletionHandler:)`](/documentation/UserNotifications/UNUserNotificationCenterDelegate/userNotificationCenter(_:didReceive:withCompletionHandler:)) method of your delegate object. The response object passed to your delegate includes the [`identifier`](/documentation/UserNotifications/UNNotificationAction/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](/documentation/UserNotifications/handling-notifications-and-notification-related-actions).

## Topics

### Essentials

[`init(identifier:title:options:)`](/documentation/UserNotifications/UNNotificationAction/init(identifier:title:options:))

Creates an action object by using the specified title and options.

[`init(identifier:title:options:icon:)`](/documentation/UserNotifications/UNNotificationAction/init(identifier:title:options:icon:))

Creates an action object by using the specified title, options, and icon.

### Getting Information

[`identifier`](/documentation/UserNotifications/UNNotificationAction/identifier)

The unique string that your app uses to identify the action.

[`title`](/documentation/UserNotifications/UNNotificationAction/title)

The localized string to use as the title of the action.

[`icon`](/documentation/UserNotifications/UNNotificationAction/icon)

The icon associated with the action.

### Getting Options

[`options`](/documentation/UserNotifications/UNNotificationAction/options)

The behaviors associated with the action.

[`UNNotificationActionOptionNone`](/documentation/UserNotifications/UNNotificationActionOptionNone)

The action has the default behavior.

[`UNNotificationActionOptions`](/documentation/UserNotifications/UNNotificationActionOptions)

The behaviors you can apply to an action.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)