---
title: UNNotificationCategory
framework: usernotifications
role: symbol
role_heading: Class
path: usernotifications/unnotificationcategory
---

# UNNotificationCategory

A type of notification your app supports and the custom actions that the system displays.

## Declaration

```swift
class UNNotificationCategory
```

## Mentioned in

Declaring your actionable notification types Generating a remote notification

## Overview

Overview A UNNotificationCategory object defines a type of notification that your executable can receive. You create category objects to define your app’s actionable notifications — notifications that have action buttons the user can select in response to the notification. Each category object you create stores the actions and other behaviors associated with a specific type of notification. Register your category objects using the setNotificationCategories(_:) method of UNUserNotificationCenter. You can register as many category objects as you need. 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. To apply category objects to your notifications, include the category’s identifier string in the payload of any notifications you create. For local notifications, put this string in the categoryIdentifier property of the UNMutableNotificationContent object that you use to specify the notification’s content. For remote notifications, use this string as the value of the category key in the aps dictionary of your payload. Categories can have associated actions, which define custom buttons the system displays for notifications of that category. When the system has unlimited space, the system displays up to 10 actions. When the system has limited space, the system displays at most two actions.

## Topics

### Essentials

- [init(identifier:actions:intentIdentifiers:options:)](usernotifications/unnotificationcategory/init(identifier:actions:intentidentifiers:options:).md)
- [init(identifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:options:)](usernotifications/unnotificationcategory/init(identifier:actions:intentidentifiers:hiddenpreviewsbodyplaceholder:options:).md)
- [init(identifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:categorySummaryFormat:options:)](usernotifications/unnotificationcategory/init(identifier:actions:intentidentifiers:hiddenpreviewsbodyplaceholder:categorysummaryformat:options:).md)

### Getting the Information

- [identifier](usernotifications/unnotificationcategory/identifier.md)
- [actions](usernotifications/unnotificationcategory/actions.md)
- [intentIdentifiers](usernotifications/unnotificationcategory/intentidentifiers.md)
- [hiddenPreviewsBodyPlaceholder](usernotifications/unnotificationcategory/hiddenpreviewsbodyplaceholder.md)
- [categorySummaryFormat](usernotifications/unnotificationcategory/categorysummaryformat.md)

### Getting the Options

- [options](usernotifications/unnotificationcategory/options.md)
- [UNNotificationCategoryOptions](usernotifications/unnotificationcategoryoptions.md)

### Initializers

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

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.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)
- [UNNotificationAction](usernotifications/unnotificationaction.md)
- [UNTextInputNotificationAction](usernotifications/untextinputnotificationaction.md)
