How can I embed TouchDB in a phonegap html5 app?

393 Views Asked by At

Basically I want the sync feature of CouchDB while developing with HTML5 and package the app with phonegapp.

I see that couchbase mobile has a few drawbacks(large code size, long startup time) and TouchDB seems promising. However, I can't find an obvious way to integrate TouchDB with Phonegapp. Is this possible? Or what's the right way to do it? Thanks in advance.

1

There are 1 best solutions below

0
On

I Think that the best way to use TouchDB on phone gap app's is to develop a phonegap-plugin that allow you to access touchDB from your JavaScript/HTML PhoneGap-app,

this means that you should develop a phonegap-plugin for Android that call TouchAndroid and another one for IOS that call TouchIOS, ...etc.

hope this help,