Class

UIUserNotificationCategory

Important:UIUserNotificationCategory is deprecated in iOS 10. Use UNNotificationCategory instead. A UIUserNotificationCategory object encapsulates information about custom actions that your app can perform in response to a local or push notification.

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.

Symbols

Getting the Group Configuration

var identifier: String?

The name of the action group.

func actions(for: UIUserNotificationActionContext)

Returns the actions to be displayed for the given notification context.