You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nolan Lawson edited this page Feb 25, 2015
·
8 revisions
PouchDB will try to detect if it's in a Cordova/Phonegap instance. However, you must create and use PouchDB inside an onDeviceReady() function, especially if you are using the SQLite Plugin, because PouchDB can only detect the SQLite Plugin after the deviceready event.
Here's an example of PouchDB usage in Phonegap:
vardb;functiononDeviceReady(){db=newPouchDB("helloworld");// okay, now we have our database}// The below, or something like it, is necessary // to use PouchDB functionality!document.addEventListener("deviceready",onDeviceReady,false);