Home » Android » realm database resetting after installing new app update

realm database resetting after installing new app update

Posted by: admin November 1, 2017 Leave a comment

Questions:

During usage the realm database is working great but I noticed during an update of my application from the play store the data I had from my previous version was wiped. Heres what happened:

I made some UI changes to the app, so the realm schema never changes (that is I never changed my database objects. I also don’t have any migration code in my app right now since I don’t think I need it, not making changes to database objects like I mentioned). I then went through the updating process for Google play, correct me if I’m doing anything wrong here:

  1. I went to project structure and up’d the version number from etc. 3 to 4.
  2. I then switched to release mode and built a new generated signed apk.
  3. I uploaded the apk to the release modules in the play console menu and then continued with the process to release the app.

After waiting a few hours for my update to go live in the store, when I downloaded the update it wiped the database again.

Confused as to whats cuasing this because from what I’ve seen in the forums, realm is supposed to stay even after IOS and Android updates?

Thanks for the help!

Answers: