Welcome to Titanium! Titanium Studio helps you develop cross-platform mobile applications built with the Titanium SDK, and helps you with debugging and deploying your applications.
This guide walks through the steps of setting up Titanium Studio, downloading and installing the necessary Titanium and third-party SDKs and tools, and creating a simple project. If you would like to exclusively use command-line tools for development, see Setting up the Titanium CLI for instructions.
If you are interested in getting started with the Appcelerator Platform, the enterprise edition of the Titanium Platform, see the Appcelerator Platform Quick Start guide.
Your system environment must meet the following conditions:
Operating System: a recent version of Windows, Mac OS X or Ubuntu
Memory: 2 GB RAM (available memory, rather than total memory)
Java Runtime: Oracle JDK (no other brand of Java is suitable)
Node.js: required for the Titanium command-line tools like the CLI, Alloy and Node.ACS.
For Windows, the 32-bit version of Java JDK is required regardless of whether Titanium is running on a 32-bit or 64-bit system.
Ubuntu 12.04 requires a few extra packages and configuration settings before Studio can be launched. Run the following commands from a terminal:
sudo apt-get install libjpeg62 libwebkitgtk-1.0-0 echo 'export MOZILLA_FIVE_HOME=/usr/lib/mozilla' >> ~/.bashrc
For 64-bit versions of Ubuntu, you need to also install the 32-bit libraries:
sudo apt-get install ia32-libs
Downloading and Installing Titanium Studio
Now, we are ready to install Titanium Studio.
To download and use Titanium Studio, a valid Appcelerator Network account is required. You may get one via the Sign Up page.
Download the installer from http://my.appcelerator.com. For Mac OS X and Windows systems, run the installer program. For Linux systems, unpack the ZIP file.
Launching Titanium Studio
When you launch Titanium Studio for the first time:
Login with your Appcelerator Network username and password.
Select a directory in the Workspace textbox to place your Titanium project files and IDE preference data.
When Studio launches for the first time, it automatically starts installing the latest Titanium SDKs and additional Titanium command-line tools. Once this is complete, confirm that no further updates are pending and that Studio is at the latest version.
Run Help > Check for Updates to verify that the latest version of Titanium Studio is installed.
Run Help > Check for Titanium SDK Updates to verify that all the official Titanium SDK releases are installed.
Repeat these two steps until there are no more updates available.
Configuring Titanium Studio
The Titanium SDK requires the native mobile SDK of each platform you are targeting to enable the development of native mobile applications to support a vast array of native built-in functionality. Open the Titanium Studio Dashboard and click each of the platform links and follow the instructions to install and configure the respective native SDKs.
If the Titanium Studio Dashboard is not already open:
Click the toolbar button with the Appcelerator logo.
Click the dashboard Get Started tab.
Scroll down to the Configure Native SDKs section.
For each platform with a red 'x', click on it to bring up the installation requirements and directions.
Follow the directions to install the native SDK.
For detailed instructions on setting up the platform SDKs, see Installing Platform SDKs .
Installing Xcode and the iOS SDK
To develop iOS applications for Apple devices, such as the iPhone and iPad, you need to have an iOS developer account. The account is free but to run on device you will need to sign up for the iOS Developer Program costing /year. Be aware of Apple's license terms, which prohibit the building and execution of iOS applications on anything other than Apple hardware.
After clicking the Titanium Studio Dashboard iOS icon, follow the on-screen instructions to download Xcode and install the resulting software image file.
Selecting the Active Xcode Version
For systems with multiple Xcode versions installed, the current version can be selected by running sudo xcode-select at the command-line.
For Xcode 4.2.x installed in the default location, run the following command:
sudo xcode-select -switch /Developer/
For Xcode 4.3.x or later installed in the default location, run the following command:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
If you are using Studio, you need to restart Studio for your changes to take effect.
Refer to the Titanium Compatibility Matrix for the versions of Xcode currently supported by Titanium.
Installing the Android SDK
After clicking the Titanium Studio Dashboard Android icon, follow the on-screen instructions to download and install the Android SDK.
When the Android SDK installer starts, set the destination directory.
The Android SDK Manager presents a list of package categories.
Select those supported by the latest official Titanium SDK, as described in the Titanium Compatibility Matrix.
Verify that the required packages for the latest official Titanium SDK are selected.
To reduce install time, expand each category and de-select unnecessary components, such as Documentation, Samples and Sources.
Click the Install x packages button.
Default Android SDK
If you are developing for Android, verify that the default Android SDK is correctly set to a SDK supported by the Titanium SDK you will be using most. All applications use this SDK when they are first launched. Open the Preferences dialog.
On Mac OS X, from the menu bar, select Titanium Studio > Preferences.
On Windows and Linux, from the menu bar, select Window > Preferences.
On Studio 3.1.0 and later, in the Preferences dialog, navigate to Studio > Platforms > Android SDK, then select a Google APIs item from the Default Android SDK drop-down menu.
On Studio 3.0.x and earlier, in the Preferences dialog, navigate to Titanium Studio > Titanium, then under the Android section, select a Google APIs item from the Default Android SDK drop-down menu.
Default iOS Simulator
For Studio 3.1.0 and later, you can select a default iOS simulator type to launch after building your application.
In the Preferences dialog, navigate to Studio > Platforms > iOS, then select a simulator type from the Default Display drop-down menu.
Your First Mobile App
Now it is time to create an app!
Return to the Titanium Studio dashboard to start a new mobile project. Choose the Develop tab, and click on the New Project button of the Single Window Application template.
Next, configure the project settings, including the project name, application identifier (app id) and your website URL.
Project name: this will become your app's name as seen by users, so choose wisely.
App Id: Titanium's version of the Android Package Name or CF Bundle Identifier. It is important to enter the name in reverse domain name format, with your app's name at the end, for example, com.example.myFirstApp. Avoid spaces and special characters.
Company/Personal URL: enter in the form, http://example.com.
Click Finish button. A project is created and opened.
The project filesystem layout is always the same for classic mobile projects.
Resources folder: your project's code files and graphics are stored in this folder.
app.js: your project's bootstrap file. Every project has one; it's the file loaded first when your app is launched.
tiapp.xml: the details you enter in the new project wizard are used to populate the tiapp.xml file.
Those are essentially the only required files, but you can create others to produce a manageable and scalable code base. For example, you could put all your graphics in the Resources directory, or you could put them into subfolders. We will dig more deeply into cross-platform development in the rest of our documentation, but the android and iphone directories within Resources are locations for your platform-specific assets.
Running Your App
To build and run your app:
Select the project in either the App Explorer or Project Explorer view.
Click the Run button and choose the appropriate target.
Your app should now be running in the mobile simulation environments you selected.
If you are experiencing problems after following these setup instructions, please follow the more detailed Setting up Studio guide.
Congratulations! You've just created and ran your first Titanium application. Try importing one of the sample projects as explained in Creating Your First Titanium Apps.
You can learn more about Titanium by clicking on the Titanium Studio Learn tab, which includes videos, tutorials, API documentation and even a Titanium book.
Thanks for checking out Titanium. We wish you the best of luck with building successful applications.