Quick Start

Quick Start

Overview

This guide walks through the steps of installing and configuring Titanium Studio and third-party SDKs and tools required to develop native mobile applications with Studio. If you prefer to use your own editor or IDE, you can integrate the Titanium command-line tools into your environment (see Setting up the Titanium CLI for instructions).

System Requirements

Your system environment must meet the following requirements to run Titanium Studio:

  • Operating System: A recent version of Windows, 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.

Download and Install Titanium Studio

To download Titanium Studio you must have an Appcelerator Network account.

  1. Create an account on the Appcelerator Network.

  2. Check your email and click the link to activate your account and open the Resources page.

  3. Click the link to download the appropriate Titanium Studio installer or application package.

  4. Install Titanium Studio:

    • Windows – Launch the installer and follow the instructions. The Windows installer also download and installs Java runtime, Node.js, and Git.

    • Mac OS X – Unpack the DMG file and drag the Titanium Studio folder to your Applications folder.

    • Linux – Unpack the ZIP file to your folder of choice.

      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

For detailed install instructions, see Installing Titanium Studio.

First Launch

The first time you launch Studio you need to select a workspace, or folder where Titanium stores your project files and IDE preferences.

images/download/attachments/37538717/image2013-11-26_13_34_46.png

By default, upon each launch, Studio asks you to select a workspace. To hide this dialog on subsequent launches, select the Use this as the default and do not ask again option.

On the Titanium Studio launch screen, enter your Appcelerator Network account credentials and click Login. Studio remembers your login credentials until you sign out of Studio.

images/download/attachments/37538717/StudioLogin.png

Studio requires an internet connection to authenticate the user to the Appcelerator cloud. If you are behind a proxy, click Proxy Setup... to configure your proxy settings.

Installing the platform SDKs

To develop native applications with Titanium you need the SDKs and tools for those native platforms installed on your system. For example, to develop Android applications you need the Android SDK and toolchain installed.

The first time you launch Studio the Platform Configuration dialog opens. This dialog indicates which platform SDKs are installed and which are not, and lets you easily install individual SDKs. In the following screenshot, the system has none of the native SDKs installed.

To install the platform SDKs:

  1. Select the platforms you want to install.

  2. Optionally click Settings next to each platform to customize the installation configuration. For more details, see Installing Platform SDKs.

  3. Click Configure to start the installation process.

Studio begins downloading and installing each SDK you selected, according to the settings you specified. In the case of iOS, Studio launches the App Store application installed on your Mac to the XCode download page.

images/download/attachments/37540095/image2013-11-26_17_21_58.png

For Studio 3.2.0 and prior, to setup the platform SDKs, use the Studio Dashboard view as described in the Legacy Setup.

Checking for Studio and SDK updates

When Studio launches for the first time, it automatically downloads and installs the latest Titanium SDKs and additional command-line tools. Once complete, confirm that no further updates are pending and that Studio is at the latest version.

From the menu bar, select Help > Check for Titanium SDK Updates to verify that all the official Titanium components are installed and repeat this step until there are no more updates available.

Hello Titanium App

Now that you've installed Titanium Studio and at least one of the native platform SDKs, you're ready to create and run an application on a device or simulator.

Create a project

The first step is to create a new Mobile App Project and select a starting template. The Titanium SDK supports two project types: Alloy and Classic. Alloy is an MVC framework that lets you develop applications in less time and with less code than is possible in a Classic project. In general, it's recommended you use Alloy for your projects.

To create a new project:

  1. In Titanium Studio, either:

    1. Press ⌘+N (Mac) or Ctrl+N (Window and Linux) to open the project wizard dialog.

    2. or from the menu bar, select File > New > Mobile App Project.

  2. Select Mobile App Project as the wizard type and click Next.

    images/download/attachments/37538717/select-wizar.png
  3. On the Project Template page, select Default Alloy Project as the template type. Click Next.

    images/download/attachments/37538717/New_Mobile_App_Project_and_Studio_-_blackberry_app_views_index.xml_-_Titanium_Studio_-__Users_tstatler_Documents_Titanium_Studio_Workspace_jack.png

  4. On the Project Location page, enter the following information:

    • In the Project Name field, enter Hello.

    • In the App ID field, enter com.example.hello. This format is called reverse domain notation. You must use your own domain before publishing your application to market, but for testing purposes a temporary domain is fine.

    • Select one or more Deployment Targets. By default, Studio selects all available targets platforms that you have installed.

      images/download/attachments/37538717/new_project.png

  5. Click Finish to create the project. By default, the application's configuration file called tiapp.xml opens. You can close that file.

  6. In the Project Explorer view, open index.xml located in the app/views folder.

    images/download/attachments/37538717/project1.png

    When developing an app in Alloy, you create your UI declaratively using XML elements that, during compilations, are mapped to standard Titanium SDK objects. For instance, the default Alloy template includes a <Label> element that corresponds to a Label object.

  7. In index.xml, change the text inside the <Label> element from Hello, World to Hello, Titanium.

  8. Save your changes. Now we're ready to run the application.

Running the application

To run the application you select a target simulator, emulator, or device, and click Run. The targets available for you to test with depends on which native SDKs you previously installed. For this example, it's assumed you've installed XCode and are targeting an iOS simulator. If you are targeting Android, or Blackberry, select an appropriate simulator, emulator or device from the Target menu.

  1. Select the project in Project Explorer.

  2. Make sure Run is selected in the Launch Mode drop-down.

  3. From the Target drop-down, select an iOS simulator.

    images/download/attachments/37538717/select-simulator.png

  4. Click Run. Your application is compiled and launched in the iOS Simulator. Click the Hello, Titanium label text. An alert dialog appears.

    images/download/attachments/37538717/ios-simulator.png images/download/attachments/37538717/image2013-11-18_17_34_30.png
    If you run into problems running your application, see Troubleshooting.

Troubleshooting

If you are experiencing problems after following these setup instructions, please follow the more detailed Setting up Studio guide.

Next Steps

You can learn more about Titanium by clicking on the Titanium Studio Learn tab, which includes videos, tutorials, and API documentation. Try importing one of the other sample projects as explained in Titanium Samples or follow Creating Your First Titanium App to build your first Alloy application.

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.