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?
Do you have an answer for this question?
I have the same question
Updating an app shouldn’t loose any data, ever.
What exactly are you doing so you are afraid of that?
thanks for your response.
In my mobile app all my data are stored in a backend webservice.
So there is no data directly stored on the mobile-device.
The only exception is the authentication token.
I store the token within the native storage to persist it.
My question now if I would update my app, would I loose the token?
If this would be the case, the user would start the app and redirected to the login page
to authenticate itself again.
If the token would be still available and valid within the native storage, the user
would be directly authenticated.
O.K the token has an expiry date, and if it’s expires, the user has to sign in either way again.
I hope my english skills are good enough, that you understand me.
No, your stored values should still be present. That’s what storage does
I don’t know how the magic on the device happens
I read, that native storage is using sqLite to store the data on the device.
But so far I know is sqLite an embedded database right?
That means it’s included within the app.
How does this ‘magic’ work, when an app updates by the store, the storage keeps separeted and
so it’s not overwritten?
Database engine can be embedded to the app (code) but data (files) are stored in app storage.
/apps/yourapp - code here
/userdata/yourapp/ - data here
In general (very simplified!) your “app” that was downloaded is never changed on the device. Everything that you create is saved in a different location.
you will only run into issues if you change the unique name of the app (like the com. package name in Android as configured in config.xml)
I want to implement similar functionality in my app. Can you please help me with some samples using which it can be implemented. I am using firebase as back end and want to store auth token in persistent store so that user is not required to religion after app upgrade.
Thanks in advance.