# Titanium.App.iOS.UserNotificationAction

An action the user selects in response to an interactive notification.

Availability
3.4.0
9.2.0

# Overview

To create a notification action, use the Titanium.App.iOS.createUserNotificationAction method.

An notification action represents an option a user selects in response to an interactive notification. The notification action is represented as a button in the application UI.

# Properties

# activationMode CREATION ONLY

Availability
3.4.0
9.2.0
activationMode :Number

Selects how to activate the application.

Set to Titanium.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_BACKGROUND to activate the application in the background to respond to the action unless the application is already in the foreground.

Set to Titanium.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_FOREGROUND to launch the application in the foreground to respond to the action. These actions won't be displayed on Apple Watch.


# authenticationRequired CREATION ONLY

Availability
3.4.0
9.2.0
authenticationRequired :Boolean

Set to true if the action requires the device to be unlocked. On the Apple Watch actions never require authentication.


# behavior CREATION ONLY

Availability
5.1.0
9.2.0
behavior :Number

Custom behavior the user notification supports.

Default: Titanium.App.iOS.USER_NOTIFICATION_BEHAVIOR_DEFAULT


# destructive CREATION ONLY

Availability
3.4.0
9.2.0
destructive :Boolean

Set to true if the action causes destructive behavior to the user's data or the application.

The action appears red in the locked screen and notification center instead of the default color.


# identifier CREATION ONLY

Availability
3.4.0
9.2.0
identifier :String

Identifier for this action. Used to identify the action the user pressed.


# title CREATION ONLY

Availability
3.4.0
9.2.0
title :String

Title of the button displayed in the notification.