-
Notifications
You must be signed in to change notification settings - Fork 34
Home
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.
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. To change the minimum OS version for your Titanium project, open the project in Xcode, navigate to the Info tab of the project, and change "iOS Deployment Target" to 5.0.
Edit tiapp.xml
and add the module to the modules
section:
<modules>
<module version="0.3" platform="iphone">com.obscure.titouchdb</module>
</modules>
Edit tiapp.xml
and add the module to the modules
section:
<modules>
<module version="0.1" platform="android">com.obscure.titouchdb</module>
</modules>
The iOS and Android versions are currently out of sync while the Android code is under development.
Here's how to load up the module and get a database object:
var server = require('com.obscure.titouchdb');
var db = server.databaseNamed('books');
db.ensureCreated();
See the API documentation and TouchBooks sample for more information.