Skip to content

Titanium.App.iOS.UserNotificationAction

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

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.

Extends: Titanium.Proxy · Since: 3.4.0 · Platforms: iphone, ipad, macos

Properties #

activationMode#

creation only

Type: 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.

apiName#

extended

Type: String

The name of the API that this proxy corresponds to.

The value of this property is the fully qualified name of the API. For example, Button
returns Ti.UI.Button.

authenticationRequired#

creation only

Type: Boolean

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

behavior#

creation only

Type: Number

Custom behavior the user notification supports.

destructive#

creation only

Type: 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

Type: String

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

lifecycleContainer#

extended

Type: Titanium.UI.Window, Titanium.UI.TabGroup

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks
will also be called on the proxy. Proxies that require the activity lifecycle will need this property set
to the appropriate containing Window or TabGroup.

title#

creation only

Type: String

Title of the button displayed in the notification.

Titanium SDK Documentation