Titanium Studio helps you develop cross-platform mobile applications built with the Titanium SDK, and helps you with debugging and deploying your applications.
Downloading and Installing 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.
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.
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.
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 $99/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.
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.
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.test.application. Avoid spaces and special characters.
- Company/Personal URL: enter in the form, http://example.com. Its not compulsion to give URL, you can skip it.
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.
Now you are ready to run your first project. To run right click on the project from “Project Explorer” and select IOS simulator or Android emulator to run.