Skip to content

Peerby/gettingStartedWithTitanium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

titanium

Installation

Appcelerator

The company that makes Titanium and offers B2B services

Building

  • iOS: you need XCode

  • Android: you need Android SDK. http://developer.android.com/sdk/index.html. That will give you an interface from which you can select android versions and install SDK's and other stuff.

    • There are many versions of Android, make sure you install the version one you want to test against. The Titianium Kitchensink app also needs Google APIs so make sure you install those too. I didn't get that to work yet.
  • You want at least version 14 of the Android API, which is Android 4.x and higher. Below is 2.3 or lower which we don't support.

  • I haven't found any 'Build on save' (like nodemon) plugin yet, so if you find one, please add it here.

  • build is triggered by: ti build -p android

  • if your app doesn't build properly for some reason you can throw away build and Resources and rebuild. ti clean only removes build folder.

Simulators

Titanium package management

Editing

Tutorials

File structure

root dir

  • android.keystore - used to sign the production app
  • app - Alloy app source
    • alloy.jmk - hooks for Alloy -> Resources building, e.g. SASS compilation
    • alloy.js - first file executed, basically main function. determine which controller to load
    • assets - all static files: images, fonts (copied to root dir when compiled)
    • config.json - configuration file for Alloy app
      • mixpanel id, facebook secret, etc.
      • separate dev/prod/local configs
    • controllers - controllers
    • lib - all js dependencies (copied to root dir when compiled)
    • models - Backbone models and collections
    • styles - TSS files that style the app
    • views - XML files, templates
    • widgets - reusable, mini apps that have the same structure
  • build - the compiled app (from Resources folder)
  • i18n - internationalization files: including app icon and splash screen
  • modules - native modules, external dependencies for Titanium
  • platform - files placed in root of project once it's compiled, eg.:
    • bundles for iOS
    • android theme
    • etc.
  • plugins - no idea
  • tiapp.xml - configuration for building the Titanium app. Everything that's normally in your Android manifest file or iOS plist, e.g.:
    • app version
    • app id
    • app name
    • which platforms are supported
    • sdk version
    • push notifications for Android
  • Resources - Alloy app compiled to vanilla Titanium code

Controllers

  • $ refers to controller object
  • all elements in view that have id are set on the $ of the controller
  • events:
    • Titanium Library objects, such as labels, buttons, windows, httpClient, use addEventListner, removeEventListner and fire
    • Alloy application objects, such as Models, Collections, Controllers, Widgets, etc, use on, off, trigger

About

How to get started with Titanium SDK on Android and iOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published