ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
193 stars 187 forks source link

Ionic and IOS delete storage information when storage is low #367

Open pedro3900 opened 6 years ago

pedro3900 commented 6 years ago

Short description of the problem:

I have implemented pouch DB with websql configuration and sqlite plugin in ionic, but in ios when the storage is full the system delete de information of the database. I had the same problem before with localstorage service.

There are any other way to save that data without be deleted by ios?

What behavior are you expecting?

Maintain my data

Steps to reproduce:

  1. You should have your ios device full of storage

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Which Ionic Version? 1.x or 2.x 1.2.1-nightly-1867

jacquesdev commented 6 years ago

Hi @pedro3900. I am using the latest version of ionic, and even with that, it does not work. I don't think it's related to the ionic project though by the way, ie it's an iOS issue. Since it stores it in the local storage of safari, if the user's device is running low on storage space it will delete the files and there is not much you can do to save it, unfortunately.

Iirc a native app would store the data locally to itself and so would not experience this issue, whereas since we are using a cordova based app, it stores it along with all the other safari related local storage, and so since it's not given a special status, it just gets removed.