Titanium Mobile: How-To - Amazon S3 .Titanium Mobile: How-To Getting Started With Appcelerator Titanium

  • View
    214

  • Download
    0

Embed Size (px)

Text of Titanium Mobile: How-To - Amazon S3 .Titanium Mobile: How-To Getting Started With Appcelerator...

Titanium Mobile: How-To

Getting Started With Appcelerator Titanium

August 17, 2010

Release GSW

For Windows

Getting Started with Appcelerator Titanium (Windows)

Copyright 2010 Appcelerator, Inc. All rights reserved.Appcelerator, Inc. 444 Castro Street, Suite 818, Mountain View, California 94041

No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, elec-tronic, photocopying, recording, or otherwise, without prior written permission of Appcelerator, Inc., with the following exceptions: Any per-son is hereby authorized to store documentation on a single computer for personal use only and to print copies of documentation for personal use provided that the documentation contains Appcelerator's copyright notice.

The Appcelerator name and logo are registered trademarks of Appcelerator, Inc. Appcelerator Titanium is a trademark of Appcelerator, Inc. All other trademarks are the property of their respective owners.

No licenses, express or implied, are granted with respect to any of the technology described in this document. Appcelerator retains all intellectual property rights associated with the technology described in this document. Every effort has been made to ensure that the information in this document is accurate. Appcelerator is not responsible for typographical or technical errors. Even though Appcelerator has reviewed this document, APPCELERATOR MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS DOCUMENT, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS DOCUMENT IS PROVIDED "AS IS," AND YOU, THE READER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY. IN NO EVENT WILL APPCELERATOR BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS DOCUMENT, even if advised of the possibility of such damages. THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Appcelerator dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty. Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state.

2 Release GSW, 8/17/10

Getting Started with Appcelerator Titanium (Windows)

Contents

Step 0: Introduction .................................................................................................... 4Step 0: Development environment requirements .......................................................................4

Step 1: Installing Titanium And Your SDK ................................................................ 5Step 1: Install Titanium and mobile SDKs .................................................................................5

Install the Sun Java 6 JDK ....................................................................................................6Install Android SDK ...............................................................................................................8Install Titanium Developer ...................................................................................................13

Step 2: Running the Sample Applications .............................................................. 16Step 2: Run the sample mobile apps .......................................................................................16

Create the HelloWorld project .............................................................................................16Run the default project for Android ......................................................................................18Edit the default project, creating Hello World on the Android ...........................................19Download the Kitchen Sink app ..........................................................................................21Import the Kitchen Sink project ...........................................................................................22Run the Kitchen Sink app on the Android emulator ............................................................23Next steps ...........................................................................................................................24Troubleshooting ...................................................................................................................24

3Release GSW, 8/17/10

Step 0: IntroductionGetting Started with Appcelerator Titanium (Windows)

Step 0: IntroductionThis section is part of the Titanium Getting Started series, covering the Steps 0 through 2 of getting Titanium installed and working on your development system.

Youve heard that Appcelerator Titanium can help you build your next great app. Lets get started with the pro-cess of installing and using Titanium. This document series covers 0 to 2 along fyour way to using Titanium for application development. Step 0 covers your existing computer environment, specifying the supported operating systems that you can

use with Titanium. In Step 1, youll learn how to download and install Titanium and the Apple and/or Android SDKs so that

youre ready to start building apps. And then in Step 2, youll use JavaScript to build your first HelloWorld app, and then run our Kitchen Sink

app that demonstrates most of the APIs that you can use in your own applications.

With Titanium, you can build apps for iPhone, iPad, and Android mobile platforms, as well as desktop apps for Mac OS X, Windows, and Linux. This guide covers only the mobile platforms.

In Step 1 and Step 2, well cover each of the mobile platforms, using each of the supported development envi-ronments. You dont have to read each section just skip over the sections that dont match your development environment or your intended target platform.

Step 0: Development environment requirementsYoure ready to go youve got your computer all set up, and ready to start working with Titanium. These are the development environments that are supported. You may find that slightly down-rev operating systems work fine as well, but these are the versions that weve tested.

If youre developing for iPhone or iPad, you must use Mac OS X for your development. Note that the current iOS (iPhone and iPad) SDK will not run on Mac OS X sys-tems earlier than Snow Leopard.

Mac OS X

Using Mac OS X, you can build mobile apps for iPhone, iPad and Android.

Weve tested Mac OS X version 10.6.4, but earlier versions of 10.6 (Snow Leopard) should work as well. (Please let us know if you have any trouble.)

Windows

We have tested these procedures with Windows 7. You may be able to use earlier versions of Windows, but we havent fully tested them, and they arent supported.

Linux

Weve tested Titanium mobile development with Ubuntu 9.10 (Karmic Koala).

You can try using other Linux distributions to develop with Titanium, but this Ubuntu distribution is the one that we test with and support. If you have trouble or success with another distribution, please let us know.

Supported Environments Mac OS X 10.6.4 (Snow Leopard) Windows 7, XP and Vista Ubuntu 9.10 (Karmic Koala)

4 Release GSW, 8/17/10

Step 1: Installing Titanium And Your SDKGetting Started with Appcelerator Titanium (Windows)

Step 1: Installing Titanium And Your SDKThis section is part of the Titanium Getting Started series, covering the Steps 0 through 2 of getting Titanium installed and working on your development system.

This document is for development using Microsoft Windows. You can also develop using a Macintosh or Linux, which are covered in related sections.

The supported development environment is Windows 7, and this guide is written for users of Windows 7 Pro-fessional. The general procedures should work with other current versions of Windows as well.

For downloaded files, the filenames given here are current as of when we created this guide. In general, it should be ok to use a later update of the listed files.

Step 1: Install Titanium and mobile SDKsAppcelerators Developer Web site contains information youll need to configure your development system, and then begin development using the sample programs. Using Firefox, or another Web browser, navigate tohttp://developer.appcelerator.com/get_started

Heres the Web page youll see:

At the bottom of the page, youll see several helpful getting started videos that you can watch. You can watch them now or later; when youre ready, continue on with these instructions.

5Release GSW, 8/17/10

Step 1: Installing Titanium And Your SDKGetting Started with Appcelerator Titanium (Windows)

Youll be installing the components on the right that youll use to develop mobile applications with Titanium.

Note that Apples iOS (iPhone) SDK is not covered here, since iOS (iPhone) development is supported only on the Mac.

There are several API revision levels, and different ver-sions of the SDKs that well be navigating through in this section. Youll want to follow these installation steps in order.

Although only the Android SDK must be installed in a specific location, you can simplify overall development if you follow the pattern of suggested directories below.

Well be using a command window for some of these commands. To open a new command window, go to All Programs -> Accessories -> Command P