Monday, April 14, 2014

titanium-alloy-framework-tutorial-1

APPCELERATOR TUTORIAL PART 1 – FIRST STEP TO APPCELERATOR TITANIUM

Do you want to be an Android and iOS developer using your web skills?Or are you sick of creating mobile applications that can only run on one mobile platform? Worry not, because Appcelerator Titanium is here to save your day.
What is appcelerator titanium?
It is an open, extensible development environment for creating beautiful native apps across different mobile devices and OSs including iOS, Android, and BlackBerry using web technologies with a few line of codes.
Why use appcelerator titanium instead of native languages?
Using titanium is for lazy developers like me who want to develop a powerful and useful cross platform mobile applications using web technologies and less codes. Here are the advantages of using titanium:
  • Open Source
  • Rapid Prototyping
  • Multi-platform development
  • Easy to layout (*compared to native android and iOS)
  • Downloadable modules (*work by other developers that can be adapted)
  • Javascript based (*A language that many developers already know)
  • CSS layouting (*CSS for customizing views and widgets)
  • Growing Community
Now you know all the advantages of appcelerator titanium, are you excited to create your first multi platform application that can bring millions of dollars into your life? Just take a deep breath, relax and scroll down and I will guide you through your first step into Appcelerator Titanium:
1) Downloading and Installing Titanium
Go to their official website http://www.appcelerator.com/developers/ and click download titanium for free, then install and follow the instructions there. It is very easy to install but requires high speed internet so that you will not encounter problems. 
2) Creating a project.
Go to File -> New -> Mobile App Project  Choose Default Alloy Project and click next.  Fill up the necessary fields and click finish.  4) Run your App.
To run your app in android go to the upper left of the studio window click the dropdown that indicates the possible devices that you can test your app. Select Android Emulator if you want to run it using emulator but if you want to run it using real device select Android device. We will choose Android Emulator right now.
*Android emulator is so slow instead of using android emulator use genymotion but if you want to use android emulator run this command to your terminal or cmd titanium config android.emulatorStartTimeout 1000000 
To run your device using IOS simulator, it’s the same procedure just select the iOS simulator.
*running the app using ios and android at the same time.
 
*** Better IDE of coding titanium is by using sublimetext2 and running or compiling your app using terminal or cmd.
To use Sublime follow the following steps.
  • Create your project using titanium studio then close titanium studio
  • Open your project using sublime
  • Install the package control for Titanium appcelerator (*optional)
  • To run your app open the terminal/cmd and go to the project root directory
  • Type  ”titanium build ––platform ios” for ios and “titanium build ––platform android” for android
  • Don’t forget to type in your terminal/cmd the titanium config android.emulatorStartTimeout 1000000 because android emulator is very slow to respond.
Using sublimeText2 for coding titanium  *If you’re not using a Mac you cannot download Xcode and in that case you can’t run your project in iOS simulator. The remedy is to copy your project and find a Mac and compile your project there. Cheers now you run your app in IOS and Android at the same time without writing any line of codes. On the next tutorial I will guide you on how the code structure of appcelerator titanium works. Stay tuned good day everyone.
- See more at: http://blog.foolprooflabs.com/2014/02/first-step-appcelerator-titanium/#sthash.8BMmBIWi.dpuf