I am developing an app using ionic2 and Couchbase Lite (for offline data storage). After releasing the app, how can I update app without losing the user data?
On any platform, the app and its data are stored in separate locations. Upgrading an app never erases its data. For more details you should look at the docs for the platform you’re targeting.
Thanks for the reply. Where is the data of Couchbase Light database will be stored (default physical location in the mobile)?
That depends on what OS you’re asking about.
I am using Cordova, Ionic 2 and developing in cross platform app. I will build the app in Android and iOS. Please provide the location details for these two platforms.
The database location for iOS + Android are mentioned on this page https://developer.couchbase.com/documentation/mobile/current/guides/couchbase-lite/native-api/manager/index.html#dude-wheres-my-database-file
How to use “Android Context object’s getFilesDir()” in ionic 2 app?
As with all hybrid frameworks, to access native functionalities you need to bridge native API methods (
getFilesDir()) to the Ionic 2 code. It is outside the scope of the Couchbase PhoneGap plugin but you could extend it to perform other operations (currently, there is 1 method bridged to start the listener). All the other Couchbase functionalities are served via the REST API.