A type of notification that your app supports and the custom actions to display with it.


@interface UNNotificationCategory : NSObject


A UNNotificationCategory object defines a type of notification that your executable can receive. You create category objects to define your app's actionable notifications—that is, notifications that have action buttons that 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 want.

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 to display for notifications of that category. When space is unlimited, the system displays up to 10 actions. When space is limited, the system displays at most two actions.


Creating a Notification Category

+ categoryWithIdentifier:actions:intentIdentifiers:options:

Creates a category object containing the specified actions and options.

+ categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:options:

Creates a category object containing the specified actions, options, and placeholder text used when previews aren’t shown.

+ categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:categorySummaryFormat:options:

Creates a category object containing the specified actions, options, placeholder text used when previews aren’t shown, and summary format string.

Getting the Category Information


The unique string assigned to the category.


The actions to display when a notification of this type is presented.


The intents related to notifications of this category.


The placeholder text to display when notification previews are disabled for the app.


A format string for the summary description used when the system groups the category’s notifications.

Getting the Category Options


Options for how to handle notifications of this type.


Constants indicating how to handle notifications associated with this category.


Inherits From

See Also

Notification Categories and User Actions

Declaring Your Actionable Notification Types

Differentiate your notifications and add action buttons to the notification interface.


A task to perform in response to a delivered notification.


An action that can accept user-typed text.