Contents

UIUserNotificationCategory

Information about custom actions that your app can perform in response to a local or push notification.

Declaration

@MainActor class UIUserNotificationCategory

Overview

Each instance of UIUserNotificationCategory represents a group of actions to display in conjunction with a single notification. The title of each action is uses as the title of a button in the alert displayed to the user. When the user taps a button, the system reports the selected action to your app delegate.

Typically, you create an instance of the UIMutableUserNotificationCategory class instead of this class. You use the mutable object to add actions and specify a category name before registering them with a UIUserNotificationSettings object.

To display a group of actions for a specific notification, configure the local or push notification with the category name of the group. For local notifications, you specify this name when configuring your UILocalNotification object. For push notifications, your server specifies a group of actions by adding a category key (whose value is the identifier of the group) to the push notification’s payload.

Topics

Creating the action group

Getting the group configuration

Constants

See Also

Deprecated classes