Type Method


Creates an action object with the specified title and options.


+ (instancetype)actionWithIdentifier:(NSString *)identifier title:(NSString *)title options:(UNNotificationActionOptions)options;



The string that you use internally to identify the action. This string must be unique among all of your app's supported actions. When the user selects the action, the system passes this string to your app and asks you to perform the related task. This parameter must not be nil or an empty string.


The localized string to display to the user. This string is used as the title of a button, which is added to the notification interface. This parameter must not be nil.


Additional options describing how the action behaves. Include options when you need the related behavior. For a list of possible values, see UNNotificationActionOptions.

Return Value

An initialized action object.