Our team is using sqlite for storage on an Ionic v1 app. It appears that whenever the storage fills up on iOS, the operating system is deleting the database. Ideally, we’d like this data to be persistent.
Initially, our code to create the DB looked like this:
self.db = window.openDatabase('example', '1.0', 'ExampleDb', 3*1024*1024);
After doing some research, I decided to try this plugin: https://github.com/litehelpers/Cordova-sqlite-storage
The code now looks like this:
self.db = $cordovaSQLite.openDatabase({name: 'example', location: 'default'});
I have tried using all of the provided locations, default
, Library
, and Documents
but the database is still being removed by the OS. Is there anything I’m missing about persistent storage?
I’ve done quite a bit of research on this issue to no avail. Any help would be greatly appreciated. Thank you for your time!