Skip to content
Paul Mietz Egli edited this page Nov 14, 2013 · 22 revisions

To learn more about TouchDB, the underlying implementation of this module, see the TouchDB-iOS Wiki. See the Building page for information on how to build the module from source.

Download the prebuilt module here:

Want documentation? We has some:

  • The API documentation lists all of the objects, properties, methods, and events provided by the TiTouchDB module.
  • Every project needs a FAQ
  • We have some sample apps:
  • I've written a step-by-step tutorial for using TiTouchDB and Alloy

iOS Usage

TiTouchDB will only run on iOS 5.0 or later. By default, Titanium applications are configured with a minimum required OS version of 4.0. With earlier versions of the Titanium SDK, you could open the generated Xcode project file and change the deployment target version to 5.0, but more recent (2.1.x) versions of the SDK, that file gets overwritten on each build. There is an open bug that promises a fix for this soon. In the meantime, you will need to edit the project file templates in your SDK directory to do the following:

  • change all instances of IPHONEOS_DEPLOYMENT_TARGET = 4.0; to IPHONEOS_DEPLOYMENT_TARGET = 5.0;
  • remove all references to armv6

The file templates are:

iphone/iphone/Titanium.xcodeproj/project.pbxproj
module/iphone/templates/___PROJECTNAME___.xcodeproj/project.pbxproj

IMPORTANT NOTE: obviously, this will affect all the projects you build with the modified SDK. You might consider copying your current SDK file and modifying the copy.

Once you have the minimum SDK set, copy the module ZIP file to either the project root directory (the same directory as tiapp.xml) or your Titanium installation. Build your project to expand the module archive. Once that is done, you can edit tiapp.xml and add the module to the modules section:

<modules>
    <module platform="iphone">com.obscure.titouchdb</module>
</modules>

If you're using Titanium Studio, you can edit tiapp.xml and add the module from the fancy GUI.

Android usage

Copy the module ZIP file to either the project root directory (the same directory as tiapp.xml) or your Titanium installation. Build your project to expand the module archive. Edit tiapp.xml and add the module to the modules section:

<modules>
    <module platform="android">com.obscure.titouchdb</module>
</modules>
Clone this wiki locally