In order to work around shortcomings of the Titanium Mobile SDK, or to add custom features to the API, it's necessary to modify the SDK iPhone and Android source code. This can either be done in the pre-built SDK, or the already-built SDK.
Building from Source
The Titanium Mobile SDK is open source under an Apache version 2 license, and is available on Github https://github.com/appcelerator/titanium_mobile. Compiling the SDK from Github source requires Python (w/JSON) and the cross-platform scons build tool: http://www.scons.org/.
1. Checkout the source (requires git)
$ git clone git://github.com/appcelerator/titanium_mobile.git
$ cd titanium_mobile
2. Edit the SDK source
3. Build the SDK
$ scons
4. Unpack newly-generated SDK zip from titanium_mobile/dist/mobilesdk-x.x.x-os.zip to your Titanium Mobile SDK directory (on Mac OS, /Library/Application Support/Titanium/mobilesdk/osx/)
5. The new SDK should be available to select from within Titanium Studio to build your project.
Modifying an Already-Built SDK
In order to make modifications to the iOS or Android code in an existing Titanium SDK, follow these steps:
- Navigate to the SDK directory
- Edit code of files to modify and save
- Delete the relevant build folder in your project directory (<project root>/build/iphone or <project root>/build/android/* - Note, only delete the contents of "android", not the folder. It's safe to delete the build/iphone folder)
- Build your project in Titanium Studio.
The changes to the SDK should be reflected in your app.