The top-level App iOS module, available only to iOS devices, that includes the facilities to create and manage local notifications and background services.
Local notifications are a way for an application that is not running in the foreground to let users know that it has information for them. When invoked, the application either displays a banner message or an alert dialog with a Close button to dismiss and an Open button to bring the application into the foreground. The application can also modify the icon badge, to show the number of pending notifications, and generate a sound.
To send a local notification, the application needs to:
For instructions on sending local interactive notifications, see the iOS Local Notifications guide.
Starting with Release 3.4.0, you can create interactive notifications, where users can respond to application notifications without launching the application to the foreground. The user needs to reveal notification actions in the notification, then press a notification action to respond to the notification. This feature is available on devices running iOS 8 or later.
To create an interactive notification, the application needs to:
For instructions on sending local interactive notifications, see the iOS Local Notifications guide.
In iOS 7, Apple introduced new background execution modes which allow the application to download content in the background. These background modes are supported in Titanium SDK 3.2.0 and later.
For more information on getting started, refer to the iOS Background Services guide.
In iOS 8, Apple introduced Handoff, which allows you to create and transfer user activies from one device to another. For example, you can start editing a document on your phone, then transfer the activity to your iPad to continue editing the document.
To make an activity shareable, use the Titanium.App.iOS.UserActivity API to create the activity. To continue the activity on another device, listen for the continueactivity event.
In iOS 9, Apple lets you index application content, such as music, videos, images and documents, to allow it to be searched in iOS Spotlight. To effectively add and remove information from the iOS search index you will need to use the following APIs:
Ti.App.iOS.SearchableItem
Ti.App.iOS.SearchableIndex
Ti.App.iOS.SearchableItem
objects to the device search indexUse with setMinimumBackgroundFetchInterval method. Specifies the smallest fetch interval supported by the system.
Requires: iOS 7.0 and later
Use with setMinimumBackgroundFetchInterval method. Used to specify a fetch interval large enough to prevent fetch operations from occurring.
Requires: iOS 7.0 and later
Convenience constant for system event "accessibilitylayoutchanged".
Convenience constant for system event "accessibilitylayoutchanged".
Convenience constant for system event "accessibilityscreenchanged".
Convenience constant for system event "accessibilityscreenchanged".
The action will execute in background. Use with the activationMode property.
Requires: iOS 8.0 and later
The action will launch the application and execute in the foreground. Use with the activationMode property.
Requires: iOS 8.0 and later
Default action behavior with no additional action support.
Requires: iOS 9.0 and later
Use with the behavior property.
Provides a textfield with the notification for the user to enter a text response.
Requires: iOS 9.0 and later
The user input will be passed to the typedText
field of the object passed to the callback
handling the localnotification
event.
Use with the behavior property.
The application may display an alert upon a notification being received. Use with the types property.
Requires: iOS 8.0 and later
The application may badge its icon upon a notification being received. Use with the types property.
Requires: iOS 8.0 and later
The application may not present any UI upon a notification being received. Use with the types property.
Requires: iOS 8.0 and later
The application may play a sound upon a notification being received. Use with the types property.
Requires: iOS 8.0 and later
Uniform type identifier for Mac OS icon images.
Constant value:com.apple.icns
Uniform type identifier for protected MPEG-4 audio (iTunes music store format).
Uniform type identifier for protected MPEG-4 audio (iTunes music store format).
Uniform type identifier for all audio content.
Constant value:public.audio
Uniform type identifier for Windows bitmap images.
Constant value:com.microsoft.bmp
Uniform type identifier for Rich Text with content embedding, pasteboard format.
Constant value:com.apple.flat-rtfd
Uniform type identifier for GIF images.
Constant value:com.compuserve.gif
Uniform type identifier for HTML.
Constant value:public.html
Uniform type identifier for Windows icon images.
Constant value:com.microsoft.ico
Uniform type identifier for all image types.
Constant value:public.image
Uniform type identifier for JPEG images.
Constant value:public.jpeg
Uniform type identifier for JPEG 2000 images.
Constant value:public.jpeg-2000
Uniform type identifier for all audiovisual content.
Constant value:public.movie
Uniform type identifier for MP3 audio.
Constant value:public.mp3
Uniform type identifier for MPEG-1 and MPEG-2 content.
Constant value:public.mpeg
Uniform type identifier for MPEG-4 content.
Constant value:public.mpeg-4
Uniform type identifier for MPEG-4 audio.
Constant value:public.mpeg-4-audio
Uniform type identifier for PDF data.
Constant value:com.adobe.pdf
Uniform type identifier for PICT images.
Constant value:com.apple.pict
Uniform type identifier for a plain text type, equivalent to MIME type text/plain.
Constant value:public.plain-text
Uniform type identifier for PNG images.
Constant value:public.png
Uniform type identifier for QuickTime images.
Constant value:com.apple.quicktime-image
Uniform type identifier for QuickTime movies.
Constant value:com.apple.quicktime-movie
Uniform type identifier for Rich Text.
Constant value:public.rtf
Uniform type identifier for Rich Text Format Directory, that is, Rich Text with content embedding, on-disk format.
Constant value:com.apple.rtfd
Uniform type identifier for all text types.
Constant value:public.text
Uniform type identifier for TIFF images.
Constant value:public.tiff
Uniform type identifier for MLTE (Textension) format for mixed text and multimedia data.
Uniform type identifier for MLTE (Textension) format for mixed text and multimedia data.
Uniform type identifier for Unicode-16 with byte-order mark (BOM), or if BOM is not present, an external representation byte order (big-endian).
Uniform type identifier for Unicode-16, native byte order, with an optional byte-order mark (BOM).
Uniform type identifier for Unicode-16, native byte order, with an optional byte-order mark (BOM).
Uniform type identifier for Unicode-8 plain text type.
Constant value:public.utf8-plain-text
Uniform type identifier for all video content without audio.
Constant value:public.video
Uniform type identifier for WebKit webarchive format.
Constant value:com.apple.webarchive
Uniform type identifier for XML.
Constant value:public.xml
The name of the API that this proxy corresponds to.
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
.
Returns a URL to open the app's settings.
Requires: iOS 8.0 and later
Used to create a URL that you can pass to the openURL method. When you open the URL built from this string, the system launches the Settings app and displays the app's custom settings, if it has any.
var settingsURL = Ti.App.iOS.applicationOpenSettingsURL;
if (Ti.Platform.canOpenURL(settingsURL)) {
Ti.Platform.openURL(settingsURL);
}
Indicates if the proxy will bubble an event to its parent.
Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window. Other common parents are table sections to their rows, table views to their sections, and scrollable views to their views. Set this property to false to disable the bubbling to the proxy's parent.
Default: true
Notification types and user notification categories the application is registered to use (available on iOS 8 and later).
Requires: iOS 8.0 and later
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
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.
Provides an Array of the NSUserActivityTypes keys defined within your Titanium project. (available on iOS 8 and later).
Requires: iOS 8.0 and later
Used to obtain a list of the NSUserActivityTypes keys defined in your Titanium project's tiapp.xml file. These NSUserActivityTypes keys are the keys which you can use working with iOS Titanium User Activities. NSUserActivityTypes must be defined at build time in your tiapp.xml file as shown below:
<ios>
<plist>
<dict>
<key>NSUserActivityTypes</key>
<array>
<string>com.setdirection.home</string>
<string>com.setdirection.shelf</string>
<string>com.setdirection.item</string>
</array>
</dict>
</plist>
</ios>
Adds the specified callback as an event listener for the named event.
Name of the event.
Callback function to invoke when the event is fired.
Applies the properties to the proxy.
Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.
A dictionary of properties to apply.
Cancels all scheduled local notifications.
Cancels a local notification.
Application-created ID of the local notification to cancel.
To create an ID for the notification, set the id
property in the userInfo
dictionary
passed to the scheduleLocalNotification method.
Creates and returns an instance of Titanium.App.iOS.SearchQuery.
Properties to set on a new object, including any defined by Titanium.App.iOS.SearchQuery except those marked not-creation or read-only.
Creates and returns an instance of Titanium.App.iOS.SearchableIndex.
Properties to set on a new object, including any defined by Titanium.App.iOS.SearchableIndex except those marked not-creation or read-only.
Creates and returns an instance of Titanium.App.iOS.SearchableItem.
Properties to set on a new object, including any defined by Titanium.App.iOS.SearchableItem except those marked not-creation or read-only.
Creates and returns an instance of Titanium.App.iOS.SearchableItemAttributeSet.
Properties to set on a new object, including any defined by Titanium.App.iOS.SearchableItemAttributeSet except those marked not-creation or read-only.
Creates and returns an instance of Titanium.App.iOS.UserActivity.
Properties to set on a new object, including any defined by Titanium.App.iOS.UserActivity except those marked not-creation or read-only.
Creates and returns an instance of Titanium.App.iOS.UserDefaults.
Properties to set on a new object, including any defined by Titanium.App.iOS.UserDefaults except those marked not-creation or read-only.
Creates and returns an instance of Titanium.App.iOS.UserNotificationAction.
Properties to set on a new object, including any defined by Titanium.App.iOS.UserNotificationAction except those marked not-creation or read-only.
Creates and returns an instance of Titanium.App.iOS.UserNotificationCategory.
Properties to set on a new object, including any defined by Titanium.App.iOS.UserNotificationCategory except those marked not-creation or read-only.
Marks the end of the app execution after initiating the download operation. Available only on iOS 7 and later.
Requires: iOS 7.0 and later
When calling this method, pass in the handlerID
value that initiated the background state.
You must call this handler after initiating the download operation and should do so as soon as possible.
Unique string identifier for the event (backgroundfetch
, silentpush
or backgroundtransfer
)
that initiated the background opertation mode.
Fires a synthesized event to any registered listeners.
Name of the event.
A dictionary of keys and values to add to the Titanium.Event object sent to the listeners.
Registers a service to run when the application is placed in the background.
Parameters used to create the service. Must include a url
property, to specify the
local JavaScript file to execute when the application is placed in the background.
Registers the application to use the requested notification types and categories (for devices running iOS 8 or later).
Requires: iOS 8.0 and later
Call this method at application start up. If the application needs to register for remote notifications, call this method before calling Titanium.Network.registerForPushNotifications.
Parameters used to enroll the application in local notifications.
Removes the specified callback as an event listener for the named event.
Multiple listeners can be registered for the same event, so the
callback
parameter is used to determine which listener to remove.
When adding a listener, you must save a reference to the callback function in order to remove the listener later:
var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
To remove the listener, pass in a reference to the callback function:
window.removeEventListener('click', listener);
Name of the event.
Callback function to remove. Must be the same function passed to addEventListener
.
Schedule a local notification.
Parameters used to create a notification.
Marks the end of an openParentApplication:reply
execution by a WatchKit extension.
deprecated
5.0.0 Use <Titanium.WatchSession> instead, which is supported on iOS 9 and later.
Requires: iOS 8.2 and later
This method must be called after your Titaium application has finished processing the watchkitextensionrequest
event. Optional
information can be provided in the userInfo argument will be provided back to the WatchKit extension as part of the reply method.
If no userInfo is provide nil will be sent to the WatchKit extension to during the reply callback.
This method should be used as part of the watchkitextensionrequest
event as shown below.
Ti.App.iOS.addEventListener("watchkitextensionrequest", function(e) {
var replyContent = {foo: "bar"};
Ti.App.iOS.sendWatchExtensionReply(e.handlerId,replyContent);
});
Unique string identifier for the event (watchkitextensionrequest
)
that initiated from the WatchKit extension calling the openParentApplication:reply method.
Custom data object which will be passed in the reply method to your WatchKit extension.
Sets the value of the bubbleParent property.
New value for the property.
Sets the value of the lifecycleContainer property.
New value for the property.
Specifies the minimum amount of time that must elapse between background fetch operations. Available only on iOS 7 and later.
Requires: iOS 7.0 and later
This property has no effect for apps that do not have the UIBackgroundModes key with the fetch value in its Info.plist file. The default fetch interval for apps is BACKGROUNDFETCHINTERVAL_NEVER. Therefore, you must call this method and set a fetch interval before your app is given background execution time.
The minimum number of seconds that must elapse before another background fetch can be initiated. This value is advisory only and does not indicate the exact amount of time expected between fetch operations.
This API can be assigned the following constants:
Fired when the application is woken up for a fetch operation. Available only on iOS 7 and later.
Requires: iOS 7.0 and later
Add this event if your app supports the fetch
UIBackground mode. When an opportunity arises to
download data, the system fires this event to give your app a chance to download any data it needs.
Your callback of this event should download the data, prepare that data for use, and call the
endBackgroundHandler method with the handlerID
parameter from this event.
When this event is fired, your app has up to 30 seconds of wall-clock time to perform the download
operation and call the endBackgroundHandler
method. In practice,
your app should call the endBackgroundHandler
method as soon as possible
after initiating the download. If you do not call the endBackgroundHandler
method in time, your app is suspended.
More importantly, the system uses the elapsed time to calculate power usage and data costs for your
app's background downloads. If your app takes a long time to call endBackgroundHandler
method, it may be given fewer
future opportunities to fetch data in the future.
If you are downloading large content, initiate the download using a
urlSession background download task, then call the endBackgroundHandler
method.
Listen for the downloadcompleted event to prepare the data for use.
The event returns the dictionary containing the handlerID
property, which is a unique handler ID for the
current event. This identifier should be passed as the argument to the
endBackgroundHandler method.
Unique string identifier for the backgroundfetch
event. This identifier should be passed as the argument
to the endBackgroundHandler method.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired when the events related to a urlSession are waiting to be processed. Available only on iOS 7 and later.
Requires: iOS 7.0 and later
The app fires this events when all background transfers associated with a urlSession
object
have finished or failed. Use this method to reconnect any urlSession
s and to update your
app's user interface. For example, you might use this method to update progress indicators
or to incorporate new content into your views. After processing the events, call the
endBackgroundHandler method with the handlerID
parameter. If a urlSession
finishes its work when your app is not running, the system
launches your app in the background so that it can process the event. In that situation,
use the provided identifier to create a new urlSessionConfiguration
and urlSession
objects.
Upon creating urlSession object, that object calls the appropriate delegate methods to
process the events.
If your app already has a session object with the specified identifier and is running or suspended,
you do not need to create a new session object using this method. Suspended apps are moved into the
background. As soon as the app is running again, the urlSession
object with the identifier receives
the events and processes them normally.
At launch time, the app does not call this method if there are uploads or downloads in progress. If you want to display the current progress of those transfers in your app's user interface, you must recreate the session object yourself. In that situation, cache the session identifier value persistently and use it to recreate your session object.
Unique string identifier for the backgroundtransfer
event. This identifier should be passed as the argument
to the endBackgroundHandler method.
The identifier of the URL session requiring attention. If your app was just launched,
you can use this identifier to create a new urlSession
object that can receive the events.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired when iOS continueactivity calls continueUserActivity
.
Requires: iOS 8.2 and later
Add this event if your Titanium application if you are responding to an iOS Handoff or Core Spotlight continueUserActivity
request. This event will
fire when a user taps on the handoff icon or the Core Spotlight search item. Your Titanium application will be opened in the background and provides
your Titanium app the information from the NSUserActivity. When this event is fired you should implement logic within your application to allow the
user to pick-up from where they left off on their other device.
Ti.App.iOS.addEventListener("continueactivity", function(e) {
console.log('activityType: '' + e.activityType);
});
Unique string identifier for the handoff user activity. The identifier must be defined in your tiapp.xml
file.
With field will contain the searchable Unique Identifier if the continueactivity is fired from a Core Spotlight searh result.
The optional title provided to the user activity or search item.
The optional webpageURL provided to the user activity.
The optional userInfo provided to the user activity. The userInfo is a custom dictionary and can contain any information needed to create your handoff or Core Spotlight session.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired to indicate that a urlSession's download task has finished downloading. Available only on iOS 7 and later.
Requires: iOS 7.0 and later
This event only needs to be used if your app is using the urlSession
module to download data.
The urlSession
download task's identifier.
The urlSession
session identifier. If it does not exist, this property is not provided.
This property is available since Titanium Mobile 5.4.0.GA.
The downloaded data as a Titanium.Blob object.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired periodically to inform the app about the download's progress of a urlSession. Available only on iOS 7 and later.
Requires: iOS 7.0 and later
This event only needs to be used if your app is using the urlSession
module to download data.
The urlSession
download task's identifier.
The urlSession
session identifier. If it does not exist, this property is not provided.
This property is available since Titanium Mobile 5.4.0.GA.
The number of bytes transferred since the last time this event was fired.
The total number of bytes transferred so far.
The expected length of the file, as provided by the Content-Length header. If this header was not provided, the value is zero.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired when a new URL is handled by the application.
Requires: iOS 8.0 and later
Incoming URL's can either be triggered by an external application or
links inside your Titanium.UI.WebView /
The launch options that are related to opening the URL.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired when a user selects an action for an interactive local notification.
Alert button text ('Open', by default) or slider text ('slide to unlock...', by default).
Alert message.
Image displayed instead of Default.png
when launching the application.
Application badge value.
Identifier of the category of the interactive notification.
Date and time when the notification was configured to fire.
Identifier of the action that was selected of the interactive notification.
Path to the sound file configured to play when the notification was fired.
Timezone of the date when the notification was configured to fire.
User input if the notification used the USER_NOTIFICATION_BEHAVIOR_TEXTINPUT
behavior.
Custom data object.
Boolean indicating if notification was received while app was in background (since Titanium SDK 6.2.0).
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired when a local notification is received by the application.
Alert button text ('View', by default) or slider text ('slide to unlock...', by default).
Alert message.
Image displayed instead of Default.png
when launching the application.
Application badge value.
Date and time when the notification was configured to fire.
Path to the sound file configured to play when the notification was fired.
Timezone of the date when the notification was configured to fire.
Custom data object.
Boolean indicating if notification was received while app was in background (since Titanium SDK 6.2.0).
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired when a user selects an action for an interactive remote notification.
The payload passed to the Apple Push Notification Service.
Identifier of the category of the interactive notification.
Identifier of the action that was selected of the interactive notification.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired to indicate that a urlSession task finished transferring data. Available only on iOS 7 and later.
Requires: iOS 7.0 and later
This event only needs to be used if your app is using the urlSession
module to download data.
Server errors are not reported through the error parameter. The only error events sent through the error parameter are client-side errors, such as being unable to resolve the hostname or connect to the host.
The urlSession
download task's identifier.
The urlSession
session identifier. If it does not exist, this property is not provided.
This property is available since Titanium Mobile 5.4.0.GA.
Indicates if the operation succeeded. Returns true if download succeeded, false otherwise.
The error code of the error, if any (potentially system-dependent).
A string containing the localized description of the error.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired to indicate that all messages enqueued for a urlSession have been delivered. Available only on iOS 7 and later.
Requires: iOS 7.0 and later
This event only needs to be used if your app is using the urlSession
module to download data.
In iOS, when a background transfer completes and if your app is no longer running, your app
is automatically relaunched in the background, and the app fires the backgroundtransfer event.
This event should contain the identifier of the session that caused your app to be launched.
Your app should then store that handlerID
before creating a background session configuration object
with the same identifier, and creating a url session object with that configuration.
The newly created session is automatically reassociated with ongoing background activity.
When your app later receives a sessioneventscompleted
event, this indicates that
all messages previously enqueued for this session have been delivered, and that it
is now safe to invoke endBackgroundHandler
method with the handlerID
or to begin any internal updates that may result in invoking
this method.
The urlSession
session identifier. If it does not exist, this property is not provided.
This property is available since Titanium Mobile 5.4.0.GA.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired when a user taps the Application Shortcut.
Requires: iOS 9.0 and later
The unique identifier for the application shortcut.
The title of the application shortcut.
The subtitle of the application shortcut.
The payload passed by the application shortcut.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired when the application is woken up by a silent remote notification. Available only on iOS 7 and later.
Requires: iOS 7.0 and later
Add this event if your app supports the remote-notification
UIBackground mode.
This event is intended as a means for apps to minimize the time that elapses between
the user seeing a push notification and the app displaying the associated data.
When a push notification arrives, the system displays the notification to the user and
launches the app in the background (if needed) so that it can call this event.
Use this event to download any data related to the push notification. When your method
is done, call the endBackgroundHandler method with
handlerID
parameter from this event.
The system fires this event regardless of the state of your app. If your app is suspended or not running, the system wakes up or launches your app and puts it into the background running state before firing the event.
When this event is fired, your app has up to 30 seconds of wall-clock time to perform the download
operation and call the endBackgroundHandler
method. In practice,
your app should call the endBackgroundHandler
method as soon as possible
after initiating the download. If you do not call the endBackgroundHandler
method in time, your app is suspended.
More importantly, the system uses the elapsed time to calculate power usage and data costs for your
app's background downloads. If your app takes a long time to call endBackgroundHandler
method, it may be given fewer
future opportunities to fetch data in the future.
If you are downloading large content, initiate the download using a
urlSession background download task, then call the endBackgroundHandler
method.
Listen for the downloadcompleted event to prepare the data for use.
The event returns the dictionary containing the handlerID
property, which is a unique handler ID for the
current event. This identifier should be passed as the argument to the
endBackgroundHandler method.
You can send extra information with a silent push using extra:
{
aps: {
'content-available': 1
},
extra: {
foo: 'bar'
}
}
In the event handler for silentpush
, your code may look something like this:
{
"handlerId": "SilentPush-1415976886.375816",
"aps": {
"content-available": 1,
},
"extra": {
"foo": "bar"
},
"bubbles": true,
"type": "silentpush",
"source": {},
"cancelBubble": false
}
Unique string identifier for the silentpush
event. This identifier should be passed as the argument
to the endBackgroundHandler method.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired periodically to inform the app about the upload's progress of a urlSession. Available only on iOS 7 and later.
Requires: iOS 7.0 and later
This event only needs to be used if your app is using the urlSession
module to upload data.
The urlSession
upload task's identifier.
The urlSession
session identifier. If it does not exist, this property is not provided.
This property is available since Titanium Mobile 5.4.0.GA.
The number of bytes transferred since the last time this event was fired.
The total number of bytes transferred so far.
The expected length of the file, as provided by the Content-Length header. If this header was not provided, the value is zero.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired when the user notification settings are registered (available for iOS 8 and later).
Requires: iOS 8.0 and later
Notification types the application is registered to use.
This API can be assigned the following constants:
Set of categories of user notification actions the application is registered to use.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.
Fired when openParentApplication:reply is called from a WatchKit extension. Available only on iOS 8.2 and later.
deprecated
5.0.0 Use <Titanium.WatchSession> instead, which is supported on iOS9 and later.
Requires: iOS 8.2 and later
Add this event if your Titanium application if you are using a WatchKit extension. When your WatchKit extension uses the openParentApplication:reply
method your Titanium application will be opened in the background and provides your Titanium app the information from the extension. When this
event is fired you must provide a reply by calling the sendWatchExtensionReply method with
the handlerID
parameter from this event.
The event returns the dictionary containing the handlerID
property, which is a unique handler ID for the
current event and the userInfo
property, containing the dictionary passed from the WatchKit extension. The handlerID
identifier
must be passed as the an argument to the sendWatchExtensionReply method.
Ti.App.iOS.addEventListener("watchkitextensionrequest",function(e){
var replyContent = {foo:"bar"};
Ti.App.iOS.sendWatchExtensionReply(e.handlerId,replyContent);
});
Unique string identifier for the watchkitextensionrequest
event. This identifier should be passed an argument
to the sendWatchExtensionReply method.
The payload passed to the openParentApplication:reply
method from the WatchKit extension.
Source object that fired the event.
Name of the event fired.
True if the event will try to bubble up if possible.
Set to true to stop the event from bubbling.