Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Appcelerator Titanium Application Development by Example Beginner's Guide

You're reading from   Appcelerator Titanium Application Development by Example Beginner's Guide Once you've got into Appcelerator Titanium you'll never look back. This book is the perfect introduction to developing native cross-platform apps for iOS, Android, and Windows 8.

Arrow left icon
Product type Paperback
Published in Apr 2013
Publisher Packt
ISBN-13 9781849695008
Length 334 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Darren Paul Cope Darren Paul Cope
Author Profile Icon Darren Paul Cope
Darren Paul Cope
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Appcelerator Titanium Application Development by Example Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. How to Get Up and Running with Titanium 2. How to Make an Interface FREE CHAPTER 3. How to Design Titanium Apps 4. Gluing Your App Together with Events, Variables, and Callbacks 5. It's All About Data 6. Cloud-enabling Your Apps 7. Putting the Phone Gadgets to Good Use 8. Creating Beautiful Interfaces 9. Spread the Word with Social Media 10. Sending Notifications 11. Testing and Deploying 12. Analytics 13. Making Money from Your App Git Integration Glossary
Pop Quiz Answers Index

Time for action – running an app in the emulator


You can run an app from either the run menu or from the navigator window, as shown in the following screenshot:

The buttons from left to right are as follows:

Button

Text

Collapse All

Collapse all items in the navigator

Link

Highlight in the navigator the current file in the main editor window

Debug

Run the app using the debugger

Run

Run the app in the emulator or on a connected device (phone or tablet connected to the computer)

Distribute

Package the app for release to an Android or iOS app store

To run the app in the emulator click on the Run button on the navigator window and select your chosen emulator from the list. If you are using a Mac, you can really exploit the power of Titanium by running the app on both Android and iOS at the same time. Otherwise, you will have to content yourself with only running the Android version of the app.

The Android emulator can take a long time to start. It certainly takes much longer than the iOS emulator. On some Android emulator devices, you need to unlock the screen display to allow the app to start.

The Android emulator will generate a lot of console messages (colored white), warnings (yellow), and the occasional error (red). This is normal; however, you may need to keep an eye on the errors to see if anything significant is going wrong.

What just happened?

If you have chosen to run the app on both Android and iOS, you will have two emulators running the Titanium application at the same time, as shown in the following screenshot:

Take a moment to congratulate yourself. By getting to this point you have installed Titanium, configured the emulators, and created your first app. You have come a long way, and have all the tools you need installed and at your disposal. All that remains in this book is to teach you how to make better apps than this.

Did the app fail to run?

Did the following message appear on the console?

"[DEBUG] Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 "Simulator session timed out."

It is fairly common to see the timeout error message the first time a new app is run. Titanium has to go through some extra stages running the app for the first time, or the fist time the app is run after a project clean.

Try running it again.

Still didn't run? It's always worth rebuilding the project from a clean build, as this can clear many problems up. First clear down the existing build by clicking on Project | Clean… and then try re-running.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image