Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed formatting and broken API links

Table of Contents
maxLevel5
minLevel2
classtutTOC
excludeGoal.*|Resources.*|Steps.*

Introductions

The tiapp.xml file and its close cousin the timodule.xml file are XML configuration files that the Titanium SDK uses to generate native resources and code. Many of the configuration that lives in tiapp.xml is cross-platform, but some is platform-specific as well. The timodule.xml file is meant for custom Titanium Modules, and generally generally only contains platform-specific configuration.

Code Block
titleExample: tiapp.xml
linenumberstrue
languagexml
<ti:app xmlns:ti="http://ti.appcelerator.org">
    <id>com.appcelerator.helloWorld</id>
    <name>helloWorld</name>
    <version>1.0.1</version>
    <icon>appicon.png</icon>
    <fullscreen>false</fullscreen>
    <navbar-hidden>false</navbar-hidden>
    <analytics>true</analytics>
    <guid>GUID</guid>
	<ios>
        <plist>
            <dict>
		        <key>UISupportedInterfaceOrientations~iphone</key>
                <array>
			        <string>Ti.UI.PORTRAIT</string>
		        </array>
		        <key>UISupportedInterfaceOrientations~ipad</key>
                <array>
			        <string>Ti.UI.PORTRAIT</string>
			        <string>Ti.UI.UPSIDE_PORTRAIT</string>
			        <string>Ti.UI.LANDSCAPE_LEFT</string>
			        <string>Ti.UI.LANDSCAPE_RIGHT</string>
		        </array>
            </dict>
        </plist>
	</ios>
	<android xmlns:android="http://schemas.android.com/apk/res/android">
        <tool-api-level>10</tool-api-level>
        <abi>all</abi>
	</android>
    <mobileweb>
        <splash>
            <enabled>true</enabled>
            <inline-css-images>true</inline-css-images>
        </splash>
        <theme>default</theme>
    </mobileweb>
	<modules/>
</ti:app>

Top

...

level elements

These configuration elements live under the root <ti:app> tag of the tiapp.xml. Unless otherwise noted, the configuration value goes inside the tag's content, that is, <element> VALUE  </element>.

guid

Required. A unique ID that associates this application for use in analytics and other Appcelerator Services.  This value is generated by Appcelerator.  Do not modify this value unless you know what you are doing.

...

In iOS, this ID must match the Bundle ID when generating an Explicit App ID in the Apple Developer: Certificates Certificates, Identifiers & Profiles  page.

Code Block
titleExample
languagexml
<id>com.bluthcompanymycompany.fakeblock</id>

name

Required. The application name. This is generally what is shown under the application icon on the end-user's mobile device.

Code Block
titleExample
languagexml
<name>Fakeblock</name>
Note

On Android, if you change the name to a value that starts with a digit, you need to prefix the name in the activity with an undersore (_) if you include activities in the Android section of the tiapp.xml file. For example, if you change the name to 2Foo the activity name will be _2Foo.

 

analytics

Whether or not to automatically collect analytics for this application. Enabled by default.  See See Analytics Architecture.

Code Block
titleExample: Enable Ti.Analytics
languagexml
<analytics>true</analytics>

...

  • <target device="DEVICE">:  Specifies Specifies if the target device is supported by the project. Must be placed inside the <deployment-targets>  element.
Code Block
titleExample: Specify the project only supports Android targets
linenumberstrue
languagexml
<deployment-targets>
    <target device="android">true</target>
    <target device="ipad">false</target>
    <target device="iphone">false</target>
    <target device="mobileweb">false</target>
</deployment-targets>

...

Users can define a target Windows version by configuring the tiapp.xml in the same way one can configure iOS and Android target versions.

Sample code:

 

Code Block
<windows>
    

	<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
    

	<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>

</windows>

 

description

The description of this application.

Code Block
languagexml
<description>Tap to rock out with this block.</description>

...

Code Block
titleExample: Default icon in ./Resources or ./Resource/<platform>
languagexml
<icon>appicon.png</icon> 

...

This element includes subelements of modules to include with the project.

  • <module platform="PLATFORM" version="MODULE_VERSION" deploy-type="DEPLOYMENT_ENVIRONMENTS">:  Defines a module to include with the project specified by the module's folder name or ZIP file minus the extension. The module should either be in the root level of the project (same level as the Resources folder) or in the <PATH_TO_TITANIUM_SDK>/modules folder. Must be placed inside the the <modules> elementelement.

    Define the platform attribute to specify which platforms to include the module with.  Specify android for Android, commonjs for all platforms, or iphone for iPhone and iPad.  Note that you can specify only one platform.  For a module that may be included on several platforms, repeat the same module entry, specifying a different platform for each entry.

    Define the version attribute if you want to use a specific version of the module.

    Define the deploy-type attribute if you want to use the module in specific environments.  To specify one or more environment, comma-separate the environment types.  You may specify the following environments: developmenttest or production.
Code Block
titleExample: Include the ti.cloud module
languagexml
<modules>
    <module platform="commonjs">ti.cloud</module>
    <module platform="android" deploy-type="development,test">junit</module>
</modules>

...

Whether or not the navigation bar is hidden for this application.  Default Default is false.

Supported since Release 5.0.0 for Android. On Android, the theme will be set to Themeto Theme.AppCompat.NoTitleBar unless fullscreen or statusbar-hidden is set to true.

plugins

This element includes subelements of plugins to include with the project.

  • <plugin version="PLUGIN_VERSION">:  Defines a plugin to include with the project specified by the plugin's folder name. Place plugins in the plugins folder of the project (same level as the Resources folder). This element must be placed inside the <plugins> elementelement.  The version attribute is optional.  Define it to include a specific version of the plugin.
Code Block
titleExample: Include the Alloy plugin
languagexml
<plugins>
    <plugin version="1.0">ti.alloy</plugin>
</plugins>

property

See Application properties below.

publisher

The publisher of this application.

Code Block
titleExample
languagexml
<publisher>Bluth Company</publisher>

...

Code Block
titleExample: Use Titanium SDK 3.2.0 GA
languagexml
<sdk-version>3.2.0.GA</sdk-version>

...

The URL of this application.

Code Block
titleExample
languagexml
<url>http://www.bluthcompany.com/fakeblock</url>

...

Prior to Release 3.3.0, for the iOS platform, the version number will be converted to three dot-separated numbers according to Apple's CFBundleShortVersionString and CFBundleVersion when creating a package.  For example, if you specify '2.1' or '2.1.0.1', the version number will be converted to '2.1.0' for the final package.

Code Block
titleExample
languagexml
<version>3.1.4</version>

Deprecated

...

elements

Anchor
app_properties
app_properties

Application

...

properties

tiapp.xml also supports ad-hoc properties that can be used by the application with Titanium.App.Properties.  These properties must be placed inside the root <ti:app element.

...

Properties generally follow the form:

Code Block
languagexml
<property name="name" type="type">value</property>

...

The special property ti.ui.defaultunit can be used to set the default unit used for specifying sizes and positions.

Code Block
languagexml
<property name="ti.ui.defaultunit">system</property>

...

Setting the default unit to pixels may cause issues on iOS unless you detect and handle Retina displays in your code.

See Ti.UI.View in the Titanium SDK API Reference for more information on units.

...

The special property appc-security-jailbreak-detect can be used to increase the security of your application by preventing the mobile app from running on a Jailbroken (iOS) or rooted (Android) device.

Code Block
languagexml
<property name="appc-security-jailbreak-detect">true</property>

...

The special property appc-security-debugger-detect can be used to increase the security of your application by preventing debugging applications from connecting to your mobile app.

Code Block
languagexml
<property name="appc-security-debugger-detect">true</property>

...

  • embed: Embeds the encryption key and initialization vector (IV) into the application binary.  The key and IV are padded and obfuscated.
  • remote: Stores the encryption key remotely, which requires the device to have an internet connection to run the application (default behavior). 
Code Block
languagexml
<property name="appc-sourcecode-encryption-policy">remote</property>

...

Under the top  <ti:app>  element, you may optionally have an <android>  element that contains Android specific configuration. If the application requires any ad-hoc XML from AndroidManifest.xml, make sure to also add the android XML namespace, as shown in the example below.  The  The official  Android Developers  website describes all the other elements that are supported, such as  <service> <uses-permission>  and  <activity>  for instance, and these will be added using the same logic.

Code Block
linenumberstrue
languagehtml/xml
<android xmlns:android="http://schemas.android.com/apk/res/android">
  <!-- Custom Titanium elements -->
  <abi>all</abi>
  <activities>
    <activity url="activity.js"/>
  </activities>
  <services>
    <service url="service.js" type="standard"/>
  </services>
  <!-- Android Manifest element -->
  <manifest>
    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14"/>
    <application>
        <activity>...</activity>
        <service>...</service>
    </application>
  </manifest>
</android>

The above example includes all of the common sections to show the structure of the XML elements. All of these sections are optional, and are described below:

abi

Selects the target ABI architecture. Only used when building for the V8 runtime. Choose between the following values:

  • all (All architectures, default)
  • arm64-v8a
  • armeabi-v7a
  • x86

Targeting an ABI architecture will help reduce the application and APK size, but will support fewer devices. Currently defaults to 'all'. You can upload multiple APK's for multiple ABI's, improving the file size of the bundled app.

activities

Defines a list of custom JavaScript-based Android activities. This is a custom Titanium XML element and should not be confused with the Android Manifest activity element.

...

Ad-hoc XML from AndroidManifest.xml.  Some common elements to set are listed below:

application

This element contains subelements that declare each of the application's components and has attributes that can affect all the components. Must be placed inside the  <manifest> element.  See the documentation for the application element in AndroidManifest.xml.

uses-permission

Request a permission for the application to use.  Must be placed inside the the <manifest> elementelement. See the "Setting calendar permissions" example below and the documentation for the uses-permission element in AndroidManifest.xml.

uses-sdk

Lets you express an application's compatibility with one or more versions of the Android platform, by means of an API Level integer.  Must be placed inside the the  <manifest> elementelement. See the "Set a target or minimum SDK level" example below and the documentation for the uses-sdk element in AndroidManifest.xml.

services

Defines a list of custom JavaScript-based Android services (long running background processes). This is a custom Titanium XML element and should not be confused with the Android Manifest service element.

...

Deprecated since Release 3.2. The version of the Android API that Titanium builds against. Currently defaults to the newest version of the Android SDK you have installed.  To set a target SDK version, see Set a target or minimum SDK level.

Android-specific application properties

Android also supports a number of application properties for various internal settings. (See Application properties above on how to define an application property.)

Property Name

Type

Default Value

Description

ti.android.shake.factor

double

1.3

Shake factor used for the "shake" event in the Titanium.Gesture module

ti.android.shake.quiet.milliseconds

int

500

Number of "quiet" milliseconds before the "shake" event is fired

ti.android.shake.active.milliseconds

int

1000

Number of "active" milliseconds before the "shake" event is fired

ti.android.google.map.api.key.development

string

N/A

Deprecated. Google Maps v1 API Key for use in development.

ti.android.google.map.api.key.production

string

N/A

Deprecated. Google Maps v1 API Key for use in production.

ti.android.httpclient.maxbuffersize

int

524288

The maximum buffer size (in bytes) before an HTTP response is written to a temporary file instead of memory (default is 512KB)

ti.android.threadstacksize

int

16384

Deprecated since Release 3.0.0.  This setting is only useful with Rhino. The stack size (in bytes) to use when creating a Javascript thread (default: 16KB). Bump larger when encountering StackOverflow errors in very large Javascript files

ti.android.compilejs

bool

N/A

Turns on or off JS compilation. By default, JS compilation is only on when distributing an application, but manually setting this to "true" will enable it for development as well.

ti.android.debug

bool

false

Turn on detailed logging in the SDK

ti.android.root.reappears.restartboolfalseRestarts the application if the root task was destroyed by Android after a period of inactivity.

ti.android.runtime

string

v8

Deprecated since Release 3.0.0. Titanium applications only support the V8 runtime since 3.0.0. 'v8' or 'rhino' (since 1.8.0)

ti.android.useLegacyWindowboolfalseNot supported since Release 3.3.0. Enables or disables the legacy window behavior that a heavyweight window is created if any of the following properties are defined on creation: fullscreen, navBarHidden, modal, or windowSoftInputMode. By default, the legacy behavior is disabled, which means all the windows are heavyweight. (since 3.2.0)
Code Block
titleExample: Disable Fastdev
languagexml
<property name="ti.android.fastdev">false</property>

...

Property Name

Type

Default Value

Description

ti.android.bug2373.finishfalseroot

bool

true (since Release 3.2.0)

false (prior to Release 3.2.0)

(New since Titanium SDK 2.1.2.) Setting to true will avoid showing any messages to the user and will force any subsequent, anomalous instantiations of the application's launch Activity to finish and disappear without disturbing the user. This is explained in greater detail in JIRA issue TIMOB-9285. This property should be used by itself, without any of the other "bug2373" properties. It is the least intrusive of these properties and should give the best user experience.

ti.android.bug2373.disableDetection

bool

false

setting to true will completely disable the workaround

ti.android.bug2373.title

String

Restart Required

title of dialog

ti.android.bug2373.message

String

An application restart is required

message used in dialog. if skipAlert is true the message is shown in a Toast if message length is > 0

ti.android.bug2373.buttonText

String

Continue

button text on alert dialog

ti.android.bug2373.restartDelay

int

500

number of milliseconds to wait before starting the new copy of the app with the correct Intent settings.

ti.android.bug2373.finishDelay

int

0

number of milliseconds to wait before finishing (exiting) the current application.

ti.android.bug2373.skipAlert

bool

false

if true, the dialog box will not be shown, but the workaround will still be applied if disableDetection is false.

Common

...

requirements

Set a target or minimum SDK level

Note

Starting with Release 4.0.0, due to the addition of material theme support, the android:targetSDKVersion attribute must be set to at least 21 or higher, and the android:minSdkVersion attribute must be set to at least 14 or higher.

Prior to Release 4.0.0 and starting with Release 3.3.0, due to the addition of the appcompat library, the android:targetSDKVersion attribute must be set to at least 14 or higher, and the android:minSdkVersion attribute must be set to at least 10 or higher.

If not, the build will fail with a "Failed to package application" error.

To indicate that your application supports a certain SDK level, add the <uses-sdk> element with the android:minSdkVersion and/or android:targetSdkVersion attributes.  It may be necessary to set these attributes to enable certain Android features, such as the action bar or theme.

Code Block
linenumberstrue
languagexml
<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest>
        <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21"/>
    </manifest>
</android>

...

To indicate that your application supports any screen densities, which is a common use-case, add the <supports-screens> element and set the screen size attributes to true:

Code Block
linenumberstrue
languagexml
langxml
<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest>
        <supports-screens
            android:smallScreens="true"
            android:normalScreens="true"
            android:largeScreens="true"
            android:xlargeScreens="true"
        />
    </manifest>
</android>
Warning

Do not set the android:anyDensity attribute to false. Google does not recommend changing the default value. Setting this attribute to false may cause undesired behavior.

 


Enabling the debugger by default

To make the app debuggable by default, set the <application> attribute to true (it's false in our default manifest template).
This setting is required to attach the Java debugger to a running application. It is not required for debugging the application's JavaScript in Studio, so setting debuggable to true may be primarily interesting to developers working on native Android modules or debugging issues in the Titanium native libraries.

Code Block
linenumberstrue
languagexml
langxml
<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest>
        <application android:debuggable="true" />
    </manifest>
</android>

...

Your Android apps are installed by default to the device's internal storage, but Titanium apps can be installed to the SD card using the following configuration:

Code Block
linenumberstrue
languagexml
langxml
<android xmlns:android="http://schemas.android.com/apk/res/android">
   <manifest android:installLocation="preferExternal">
      <uses-sdk android:minSdkVersion="7" />
   </manifest>
</android>

...

To request a large heap size on Android 3.x and later, set the android:largeHeap property of the <application> attribute to true. Requires API level 11 level 11 or higher.  Note that you are not guaranteed a fixed increase in available memory, because some devices are constrained by their total available memory.

Code Block
linenumberstrue
languagexml
<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest>
        <application android:largeHeap="true"/>
    </manifest>
</android>

iOS-specific section

Under the top <ti:app> elementelement, you may optionally have iOS-specific elements.

Code Block
linenumberstrue
languagexml
<ti:app>
    <ios>
        <entitlements>
			<dict>
				<!-- Enter entitlements like com.apple.security.application-groups -->
			</dict>
        <extensions>
            ...
        </extensions>
        <plist>
            <dict>
                <!-- Enter Info.plist entries like UIStatusBarStyle -->
            </dict>
        </plist>
        <use-autolayout>true</use-autolayout>
    </ios>
</ti:app>

...

Code Block
titleExample: Enable app-groups for app-extensions
linenumberstrue
languagexml
<ti:app>
  <ios>
    <entitlements>
      <dict>
        <!-- Example: Enable app-groups for app-extensions -->
      	<key>com.apple.security.application-groups</key>
       	<array>
          <string>group.com.appcelerator.mycoolapp</string>
        </array>
      </dict>
    </entitlements>
  <ios>
</ti:app>

...

Code Block
titleExample: Include watchOS extensions
linenumberstrue
languagexml
<ti:app>
  <ios>
    <extensions>
      <extension projectPath="extensions/foo/foo.xcodeproj">
        <target name="foo WatchApp Extension">
          <provisioning-profiles>
            <devices/>
            <dist-appstore/>
            <dist-adhoc/>
          </provisioning-profiles>
        </target>
        <target name="foo WatchApp">
          <provisioning-profiles>
            <devices/>
            <dist-appstore/>
            <dist-adhoc/>
          </provisioning-profiles>
        </target> 
      </extension>
    </extensions>
  <ios>
</ti:app>

...

Specifies the minimum iOS version supported by this application. The default value when not specified is "8.0".

 

Code Block
titleExample: Set 9.0 as the minimum iOS version
languagexml
<ios>
    <!-- Require iOS 8.2 or later -->
    <min-ios-ver>8.2</min-ios-ver>
</ios>

...

Not all keys are supported at this time. See Unsupported Info.plist Keys for a list of keys that may not be overridden in the tiapp.xml file.

...

Specifies which interface orientations this application supports.

Replaces Replaces <orientations>.

For device-specific configurations, use:

...

Code Block
titleExample: Limits iPhone orientation to portait and no limits for iPad
linenumberstrue
languagexml
<ios>
<plist>
<dict>
  <key>UISupportedInterfaceOrientations~iphone</key>
  <array>
    <string>UIInterfaceOrientationPortrait</string>
  </array>
  <key>UISupportedInterfaceOrientations~ipad</key>
  <array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
  </array>
</dict>
</plist>
</ios>

...

A list of background modes this app supports. For a BackgroundService to run for more than a limited period of time, the application must declare one or more of these background modes.

...

Code Block
titleExample: Enables all background services
linenumberstrue
languagexml
<ios>
<plist>
<dict>
  <key>UIBackgroundModes</key>
  <array>
    <string>audio</string>
    <string>location</string>
    <string>voip</string>
    <string>newsstand-content</string>
    <string>external-accessory</string>
    <string>bluetooth-central</string>
    <string>bluetooth-peripheral</string>
  </array>
</dict>
</plist>
</ios>

...

Code Block
titleExample: Require all device capabilities
linenumberstrue
languagexml
<ios>
<plist>
<dict>
  <key>UIRequiredDeviceCapabilities</key>
  <array>
    <string>telephony</string>
    <string>wifi</string>
    <string>sms</string>
    <string>still-camera</string>
    <string>auto-focus-camera</string>
    <string>front-facing-camera</string>
    <string>camera-flash</string>
    <string>video-camera</string>
    <string>accelerometer</string>
    <string>gyroscope</string>
    <string>location-services</string>
    <string>gps</string>
    <string>magnetometer</string>
    <string>gamekit</string>
    <string>microphone</string>
    <string>opengles-1</string>
    <string>opengles-2</string>
    <string>armv6</string>
    <string>armv7</string>
    <string>peer-peer</string>
    <string>bluetooth-le</string>
  </array>
</dict>
</plist>
</ios>

...

Specifies whether the app’s icon already includes a shine effect.

Replaces the top-level level <prerendered-icon> elementelement.

Code Block
titleExample
languagexml
<key>UIPrerenderedIcon</key><true/>

...

Replaces the top-level <statusbar-hidden> elementelement.

Code Block
titleExample: Hide the status bar
languagexml
<key>UIStatusBarHidden</key><true/>

...

Replaces the top-level <statusbar-style> elementelement.

Code Block
titleExample: Use the tranluscent style
languagexml
<key>UIStatusBarStyle</key><string>UIStatusBarStyleBlackTranslucent</string>

Unsupported Info.plist

...

keys

The following Info.plist properties are ignored in the  <plist>the <plist> section. The values for these properties are automatically generated by Titanium and may not be overridden in the tiapp.xml file or custom Info.plist file.

...

With some of the new security features of iOS9, SDK 5.1.2's canOpenUrl might fail without adding in the proper properties in the info.plist file. For example, 

Code Block
linenumberstrue
languagexml
<key>LSApplicationQueriesSchemes</key>
    <array>
        <string>fbapi</string>
        <string>fbauth2</string>
        <string>fbshareextension</string>
        <string>fb-messenger-api</string>
        <string>twitter</string>
        <string>whatsapp</string>
        <string>instagram</string>
        <string>comgooglemaps</string>
    </array>

...

Since Release 6.0.0. Specifies a custom port to use for the iOS log-server. Use this when the default port is causing issues like "Trying to connect to log server port xxxxx ...".

Code Block
linenumberstrue
languagexml
<ti:app>
    <ios>
		<!-- Or any other available port -->
        <log-server-port>27973</log-server>
    </ios>
</ti:app>

allow-custom-keyboards

Since Release 6.1.0. Allow or disallow custom iOS 8+ keyboard extensions. By default, custom keyboard extensions are allowed. Add this property and set it to false to disallow custom keyboard extensions.

...

Note
titleFilesystem Access

Because images are store in the Asset Catalog, reading image files manually from the filesystem should be done using the Ti.Filesystem.getAsset() method. 

Code Block
linenumberstrue
languagexml
<ti:app>
    <ios>
         <use-app-thinning>true</use-app-thinning>
    </ios>
</ti:app>

...

Warning
titleExperimental Feature

This is an experimental feature with known issues:

If you find any issue using this feature, file a bug in JIRA.

Code Block
linenumberstrue
languagexml
<ti:app>
    <ios>
        <use-autolayout>true</use-autolayout>
    </ios>
</ti:app>

use-jscore-framework

Since Release 4.1.0. Use the built-in JavaScriptCore framework rather than the custom Titanium one. It will be made default in Titanium SDK 7.0.0 and later.

Code Block
linenumberstrue
languagexml
<ti:app>
    <ios>
        <use-jscore-framework>true</use-jscore-framework>
    </ios>
</ti:app>


Legacy iPhone

...

Prior to release 2.1, iOS-specific settings were contained in an <iphone> element. These settings are deprecated and should be replaced with the corresponding iOS settings listed in the iOS specific section. It will be removed in Titanium SDK 7.0.0 and later.

  • <orientations device="device">: Restricts the device to these orientations when the application is running. The value of "device" can be "iphone", or "ipad". Deprecated in Release 2.1, use UISupportedInterfaceOrientations instead.
    • <orientation>: An orientation for this <orientations> list, valid values are: Ti.UI.PORTRAITTi.UI.UPSIDE_PORTRAITTi.UI.LANDSCAPE_LEFTTi.UI.LANDSCAPE_RIGHT.
  • <backgroundModes>: A list of background modes this app supports. Deprecated in Release 2.1, use UIBackgroundModes instead.
    For a BackgroundService to run for more than a limited period of time, the application must include the  <backgroundModes> element in tiapp.xml.
    • <mode>: A background mode, valid values are: audiolocation, and voip.
  • <requires>: A list of features this app requires. Deprecated in Release 2.1, use UIRequiredDeviceCapabilitiesinstead.
    • <feature>: A feature that this app requires, valid values are: telephonywifismsstill-cameraauto-focus-camerafront-facing-cameracamera-flashvideo-cameraaccelerometergyroscopelocation-servicesgpsmagnetometergamekitmicrophoneopengles-1opengles-2armv6armv7peer-peer

Mobile-Web-specific

...

Under the top  <ti:app>  element, you may optionally have a  <mobileweb>  element that contains a Mobile-Web-specific configuration.

analytics

Define analytics-related settings. Only one setting is currently supported.

...

Code Block
titleExample: Cache some resources
linenumberstrue
languagexml
<precache>
    <image>images/background.png</image>
    <include>libs/foo.js</include>
    <locale>es</locale>
    <require>modules/foobar.js</require>
</precache>

...

Code Block
titleExample: Enable the splash screen but do no preload it
languagexml
<splash>
    <enabled>true</enabled>
    <inline-css-images>false</inline-css-images>
</splash>

...

Currently, only default is supported. Do not change this value.

Windows-specific

...

Under the top <ti:app> element, you may optionally have a <windows> element element that contains Windows-specific configuration settings.

...

Since Release 5.1.0. Set to the  Package/Identity/Name of the application, which was generated when you created the application in the Windows Dev Center Dashboard.  Required to package the application.  Microsoft will validate this field when you submit the package to the Windows Store.

manifest

Add the <manifest> element as a child of the <windows> element to include ad-hoc Windows appx.manifest XML elements.  You may optionally define the target attribute and set it to either phone or store to have Windows Phone or Windows Store specific manifests, respectively.

...

Users can generate capabilities even if they are not defined in the tiapp.xml file. For example, if app.js includes a capability but it's not listed as a capability in the tiapp.xml:

app.js:

 

Code Block
languagejs
Ti.App.setProximityDetection(true);

 

tiapp.xml:

 

Code Block
linenumberstrue
languagexml
<windows>
    <manifest>
        <Capabilities>
            <Capability Name="internetClient" />
            <Capability Name="picturesLibrary" />
        </Capabilities>
    </manifest>
</windows>

 

And you build the app with this command: appc run -p windows -S 10.0 --build-only

The result should be this:

 

Code Block
linenumberstrue
languagexml
...
<Capabilities>
    <Capability Name="internetClient" />
    <uap:Capability Name="picturesLibrary" />
    <DeviceCapability Name="proximity" />
</Capabilities>
...

 

When building a Windows platform module that requires specific capabilities, the user can use timodule.xml the same way Android modules requires specific capabilities. At build time, these required capabilities will be included in the user's app.

For example, when building an app that has the following capability in the timodule.xml:

 

Code Block
linenumberstrue
languagexml
<manifest>
    <Capabilities>
        <DeviceCapability Name="location" />
    </Capabilities>
</manifest>

 

Once the app has been built, you should see that the timodule.xml was updated to look something like this:

 

Code Block
linenumberstrue
languagexml
...
<Capabilities>
    <Capability Name="internetClient" />
    <DeviceCapability Name="location"/>
</Capabilities>
...

 

Internet capability

Enabled by default, required for Titanium.Network.*

Code Block
linenumberstrue
languagexml
<ti:app>
  ...
  <windows>
    <manifest>
      <Capabilities>
        <Capability Name="internetClient" />
      </Capabilities>
    </manifest>
  </windows>
  ...
</ti:app>
Location capability

Required for Titanium.Geolocation

Code Block
linenumberstrue
languagexml
<ti:app>
  ...
  <windows>
    ...
    <manifest>
      <Capabilities>
        <DeviceCapability Name="location" />
      </Capabilities>
    </manifest>
    ...
  </windows>
  ...
</ti:app>
Background audio capability

Required for Titanium.Media.AudioPlayer background audio functionality

Code Block
linenumberstrue
languagexml
<ti:app>
  ...
  <windows>
    ...
    <manifest>
      <Extensions>
        <Extension Category="windows.backgroundTasks" Executable="$targetnametoken$.exe" EntryPoint="TitaniumWindows_Media.AudioBackground">
          <BackgroundTasks>
            <Task Type="audio" />
          </BackgroundTasks>
        </Extension>
      </Extensions>
    </manifest>
    ...
  </windows>
  ...
</ti:app>
Audio recorder

Required for Titanium.Media.AudioRecorder functionality

Code Block
linenumberstrue
languagexml
<ti:app>
  ...
  <windows>
    ...
    <Capabilities>
        <Capability Name="musicLibrary" />
        <DeviceCapability Name="microphone" />
        <DeviceCapability Name="webcam" />
    </Capabilities>
    ...
  </windows>
  ...
</ti:app>
Photo gallery

Required for Titanium.Media.openPhotoGallery functionality

Code Block
linenumberstrue
languagexml
<ti:app>
  ...
  <windows>
    ...
    <Capabilities>
        <Capability Name="picturesLibrary" />
    </Capabilities>
    ...
  </windows>
  ...
</ti:app>

...

Capabilities can also be set independently for store or phone applications by specifying the target.

Code Block
linenumberstrue
languagexml
<ti:app>
  ...
  <windows>
    ...
    <manifest target="phone">
      <Capabilities>
        <DeviceCapability Name="location" />
      </Capabilities>
    </manifest>
    <manifest target="store">
      <Capabilities>
        <Capability Name="internetClient" />
      </Capabilities>
    </manifest>
    ...
  </windows>
  ...
</ti:app>

...

Windows Phone 8.1:

Code Block
linenumberstrue
languagexml
<ti:app>
    ...
    <windows>
        <manifest target="phone" version="8.1">
            <Capabilities>
                <Capability Name="appointments" />
            </Capabilities>
        </manifest>
    </windows>
    ...
</ti:app>

Windows 8.1 Store 

Code Block
linenumberstrue
languagexml
<ti:app>
    ...
    <windows>
        <manifest target="store" version="8.1">
            <Capabilities>
                <Capability Name="musicLibrary" />
            </Capabilities>
        </manifest>
    </windows>
    ...
</ti:app>

Windows 10 is universal so target doesn't matter:

Code Block
linenumberstrue
languagexml
<ti:app>
    ...
    <windows>
        <manifest version="10.0">
            <Capabilities>
                <Capability Name="contacts"/>
            </Capabilities>
        </manifest>
    </windows>
    ...
</ti:app>

Common capabilities across targets and SDK versions (Windows 10, Windows 8.1 Store, and Windows 8.1 Phone):

Code Block
linenumberstrue
languagexml
<ti:app>
    ...
    <windows>
        <manifest>
            <Capabilities>
                <Capability Name="internetClient" />
            </Capabilities>
        </manifest>
    </windows>
    ...
</ti:app>

...

Property NameDescription
ti.windows.publishername

Must match the Windows publisher ID of your Microsoft Developer account. Used by the Titanium for the Windows SDKs to generate signing certificates and sign your package.

  To retrieve your Windows publisher ID:

 

  1. Log into https://dev.windows.com.
  2. Click Dashboard in the top-right corner.
  3. Click Account settings in the left navigation.

 

The publisher GUID will be under the Account details section as the  Windows publisher ID field.

Example:

 

Code Block
languagexml
<property name="ti.windows.publishername" type="
string”>CN
string”>CN=11111111-2222-3333-4444-
555555555555<
555555555555</property>
 

Cloud

Mobile Backend Services uses the following Application properties to configure a Titanium project to use Mobile Backend Services.  If  If a deployment-specific setting is provided (production or development) then that value will be used for the current deployment environment.  To specify a deployment-specific settings add the suffix -development or -production to the property name, for example, acs-api-key-development and acs-api-key-productions are the deployment-specific settings for acs-api-key.

Property Name

Type

Default Value

Description

acs-api-key

string

N/A

Arrow API key. Generated when enabling the project for Cloud services.

acs-base-urlstring

https://api.cloud.appcelerator.com

Arrow API URL. DO NOT SET OR MODIFY UNLESS INSTRUCTED TO.
acs-grouped-notification-messagestringN/ASpecifies the message to display for grouped notifications, for example, "You have $number$ unread messages." The $number$ variable represents the number of unread messages. This property is also supported in the strings.xml file under the i18n folder for internationalized versions.

acs-push-api-url

stringhttps://api.cloud.appcelerator.com/Mobile Backend Services dispatcher URL for Android GCM or FCM push notifications. Firebase Cloud Messaging (FCM) is the new version of GCM. DO NOT SET OR MODIFY UNLESS INSTRUCTED TO.
acs-authbase-urlstring

https://secure-identity.cloud.appcelerator.com

OAuth authentication is no longer supported in the ti.cloud module.

Arrow Authentication URL.
acs-oauth-keystringN/AOAuth authentication is no longer supported in the ti.cloud module.

ACS OAuth key. Generated when enabling the project for Cloud services.
acs-oauth-secretstringN/AOAuth authentication is no longer supported in the ti.cloud module.

ACS OAuth secret. Generated when enabling the project for Cloud services.

acs-push-type

string

gcm

Deprecated since Release 3.2.0. The ti.cloudpush module now only supports GCM or FCM. Firebase Cloud Messaging (FCM) is the new version of GCM.

Selects the push notification type for Android devices, either gcm or mqtt.

...

Code Block
titletimodule.xml
linenumberstrue
languagexml
<android xmlns:android="http://schemas.android.com/apk/res/android">
  <manifest>
    <permission android:name="${tiapp.properties['id']}.permission.MY_NEW_PERMISSION"
		android:protectionLevel="signature" />
  </manifest>
</android>

...

If you include this module in an application with the App ID com.example.app, the AndroidManifest.xml file is generated with the following permission element:

Code Block
languagexml
<permission android:name="com.example.app.permission.MY_NEW_PERMISSION"
		android:protectionLevel="signature" />