Skip to content
pegli edited this page Apr 18, 2012 · 22 revisions

To learn more about TouchDB, the underlying implementation of this module, see the TouchDB-iOS Wiki.

Installation

TiTouchDB requires that the TouchDB and TouchDBListener frameworks are installed at build time.

  1. Grab the module zip file from the Downloads section and place it in your Titanium folder (usually ~/Library/Application Support/Titanium).
  2. Get the latest prebuilt TouchDB libraries from the TouchDB Downloads page.
  3. Extract the TouchDB zip file and cd to the iOS folder.
  4. Copy TouchDB.framework and TouchDBListener.framework to ~/Library/Frameworks, creating that folder if necessary.

Usage

Here's how to load up the module and get a database object:

var TiTouchDB = require('com.obscure.TiTouchDB');
var db = TiTouchDB.databaseNamed('books');
db.ensureCreated();

See the API documentation and TouchBooks sample for more information.

Clone this wiki locally