Home > Android, Appcelerator, iOS, JavaScript, Mobile > Getting Started with Appcelerator Titanium Mobile

Getting Started with Appcelerator Titanium Mobile

Here’s a quick list of steps to get you started with Appcelerator Titanium Mobile. Following them should help you avoid some common pitfalls (well, the ones I fell into at least!)

  1. Make sure you have and can run an Android emulator. http://developer.android.com/sdk/index.html If you’re on a Mac, also install the latest iOS and XCode SDK from http://developer.apple.com
  2. Download Titanium from http://appcelerator.com
  3. The first time you run Titanium, it should ask you to log in then download the latest version of Titanium Mobile. It does this because Titanium lets you build mobile and desktop apps. In our case, we’re building mobile.
  4. After Titanium downloads the latest Titanium Mobile release, change to the “Profile” perspective (top left, looks like a single guy). Update the information in here, and set the directory where you installed your Android SDK. Mine is “/Users/dawson/android-sdk-mac_86/” (notice that I did not do android-sdk-mac_86/tools”). Click “Save Profile”.
  5. Switch back to the “Projects” perspective (top left, looks like a briefcase).
  6. Click “New Project”, and use the following for the fields:
        - Project Type: Mobile
        - Name: MyFirstMobileApp
        - App Id: com.yourname.myfirstmobileapp
        - Directory: the directory you want your project to be in. This is case sensitive, so be careful!
        - Company/Personal URL: your website's URL, or some random website
        - Titanium SDK version: 1.4.2
        - Installed Mobile Platforms: There should be a green checkmark next to "Android SDK Found". If not, go back and verify steps 1 and 3 were done properly.
  7. Click “Create Project”, and your project will be created. Make sure it works by clicking the “Test & Package” tab, then the “Run Emulator” tab, and then the “Launch” button.
  8. The emulator should launch, and you should see a simple app with two tabs.
  9. Now let’s edit your app. Titanium doesn’t include an IDE, so open up your favorite editor, and look in the directory you created your app in. There will now be a “Resources” folder, and in that a “app.js” file. App.js is the entry point to your application, so open it first and take a look.
  10. Look at the API online and grow your application to what you need it to do. https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI-module

If you want, I have released a library to make using Titanium easier and a bit more jQuery like. It’s available here, and includes a test project to demonstrate most of what it does for you: https://github.com/dawsontoth/Appcelerator-Titanium-Redux

Let me know how it goes. There are a lot of steps, but I was pretty verbose. You should fly through it, but if you get tripped up, just comment me. Titanium tends to trip up on some really simple things that are easy to get past if you know what to look for, but you can waste a lot of time if you haven’t been through it before.

Regards,

Dawson

Advertisement
  1. Jeremy
    April 27, 2011 at 1:44 pm | #1

    Hello, i tried to follow this guide but i cannot change the project type from desktop to mobile in titanium, i have both android and ios sdk installed and i have set the android sdk location

    thx for your time

    • April 27, 2011 at 6:53 pm | #2

      Hi Jeremy! What platform are you on? Windows, Mac, or Linux? Have you installed any of the Titanium Mobile SDKs? Do you receive a prompt in the top right of Titanium Developer to install a new SDK? There are a number of great “Getting Started” guides that Appcelerator has made. They’re a bit more holistic than my guide here was.

      http://wiki.appcelerator.org/label/guides/getting-started

      Let me know, and we’ll get you runnin’!
      Dawson

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.