This documentation relates to previous versions of Titanium.

To see the latest documentation, visit docs.appcelerator.com.

Skip to end of metadata
Go to start of metadata

The titanium script in the Mobile SDK provides a command line interface to various common tasks such as creating, building, and running Titanium Mobile projects and modules.

Environment Setup

It's recommended that you setup an alias or add the SDK to your PATH so you can call it directly.

If you're installing the Titanium Mobile SDK from Titanium Studio, the location of the Mobile SDK is controlled by the Titanium SDK Home preference setting. To find this setting in Titanium Studio:

  1. Click Window > Preferences. On OS X, use Titanium Studio > Preferences instead.
  2. Expand the Titanium Studio item and click on Titanium.
  3. Check the value of Titanium SDK Home.

If you did not install the Mobile SDK using Studio, use the path where you installed the Mobile SDK.

The following sections provide steps for setting up the environment on different development OSes:

Windows

Open your environment variable settings by going to:

  • Start Menu > Right click on "Computer" > Properties > Advanced System Settings
  • Click on the "Advanced" tab, and the "Environment Variables" button near the bottom
  • Double click or create a new entry for PATH under User Variables.
  • in Window Vista or Windows 7:
    • Add the Mobile SDK path you looked up in Titanium Studio.
    • If you didn't install the SDK from Studio, use the path where you installed the SDK, such as:
      C:\ProgramData\Titanium\mobilesdk\win32\<VERSION>
      Where <VERSION> is the version of the SDK you have installed.
  • In Windows XP:
    • Add the Mobile SDK path you looked up in Titanium Studio.
    • If you didn't install the SDK from Studio, use the path where you installed the SDK, such as:
      C:\Documents and Settings\All Users\Application Data\Titanium\mobilesdk\win32\<VERSION>
      Where <VERSION> is the version of the SDK you have installed.
OS X

Add an alias to your ~/.bash_profile, or create a ~/.bash_profile file if you don't already have one.

Depending on where your mobile SDKs are installed, this will probably look like:

or

Where <VERSION> is the version of the SDK you have installed.

To add the alias to your environment, run the following command:

Linux

Add this to your ~/.bash_profile

Where <VERSION> is the version of the SDK you have installed.

Testing

Once you have the environment setup, you should be able to run titanium in a console window, and see the following output:

Commands

Command

Description

create

Creates a Titanium Mobile project (use --type=module for module projects).

run

Runs a Titanium Mobile project or module "example" project.

emulator

Starts the Android emulator.

docgen

Generates HTML documentation from Markdown in an Android module.

fastdev

Management interface for the Android Fastdev server.

help

Shows help command

Examples

Create an Android Project
Run a project on the Android Emulator
Labels
  • None