Type Method

categoryWithIdentifier:actions:intentIdentifiers:options:

Creates a category object containing the specified actions and options.

Declaration

+ (instancetype)categoryWithIdentifier:(NSString *)identifier actions:(NSArray<UNNotificationAction *> *)actions intentIdentifiers:(NSArray<NSString *> *)intentIdentifiers options:(UNNotificationCategoryOptions)options;

Parameters

identifier

The unique identifier for the category. Each category that your app uses must have a unique identifier. Do not specify an empty string.

actions

The actions to display when notifications of this type are delivered. When minimal space is available, only the first two actions in the array are displayed. You may specify nil for this parameter if you do not want to display custom actions.

intentIdentifiers

The intent identifier strings that you want to associate with notifications of this type. The Intents framework defines constants for each type of intent that you can associate with your notifications.

options

Additional options for handling notifications of this type. For a list of possible values, see UNNotificationCategoryOptions.

Return Value

An initialized category object.

See Also

Creating a Notification Category

+ 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.