Skip to content
Paul Mietz Egli edited this page May 27, 2014 · 14 revisions

Remember that if you build the module from source, you must remove the build directories of any projects that use the module and rebuild those projects!

iOS

Requirements:

  • Xcode 5.0.x or later.
  • Titanium SDK 3.1.0 or later
  1. Clone the source code using git clone [email protected]:pegli/ti_touchdb.git
  2. cd to ti_touchdb and run git submodule update --init --recursive.
  3. cd mobile/ios and edit titanium.xcconfig:
  • Ensure that the TITANIUM_HOME variable file points to your Titanium SDK installation (default is $(HOME)/Library/Application Support/Titanium).
  • Ensure that the TITANIUM_SDK_VERSION is set to an installed SDK.
  1. Build the module with ./build.py and copy the module file to $TITANIUM_HOME or your project's root directory.
  2. If you would like to run the unit tests, link the shared test directory into the iOS module directory with ln -s ../noarch/example . and run $TITANIUM_HOME/mobilesdk/osx/3.2.3.GA/titanium.py run --platform=iphone. After typing that command a few times, you might want to create an alias in your ~/.bash_profile like this:
export TI_SDK_VERSION=3.2.3.GA
export TITANIUM_HOME="$HOME/Library/Application Support/Titanium"
alias tiold='"$TITANIUM_HOME/mobilesdk/osx/$TI_SDK_VERSION/titanium.py"'

Android

Requirements:

  • Android SDK r22.0.1 or later with API 13 or later installed
  • Android NDK r8e or later
  • Titanium SDK 3.2.3.GA or later

The Android build uses a file named build.properties to determine the location of the Titanium and Android SDKs. Create this file in the ti_touchdb/mobile/android directory and set the following properties appropriately for your system:

titanium.platform=/Users/YOURUSERNAME/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android
android.platform=/usr/local/opt/android-sdk/platforms/android-8
android.ndk=/usr/local/opt/android-ndk
google.apis=/usr/local/opt/android-sdk/add-ons/addon-google_apis-google-8

The example above shows where the Android SDK and Google APIs will be if you used Homebrew to install them on an OSX system.

  1. Clone the source code using git clone [email protected]:pegli/ti_touchdb.git
  2. cd to ti_touchdb and run git submodule update --init --recursive.
  3. cd mobile/android and run ant dist. The module will be located in the dist directory.
Clone this wiki locally