-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database not migrated after app update? (Data loss after update) #80
Comments
Honestly I can't recall why I set that value. Looks like cordova-sqlite-storage made this optional. |
Have you ever experienced the issue I mentioned where the db file was not migrated over with an app update? I'm not certain that that's what's happening in my case, but this is the closest match I could find to a possibility. BTW that SO answer is 6+ years old and I'm not even sure if it's really true or not. |
Well, I found this thread storesafe/cordova-sqlite-storage#430 which references this 5 year old article from Apple which advises never to store a sqlite store file in iCloud (why this is the case is not really explained in the article). But it seems that some people were getting their app rejected over this. |
I reached out to Apple about this and referenced that article, and this is what the had to say:
So it seems like the |
A few years back the recommendation was to not store downloaded content / cached stuff in iCloud backups. In addition, many apps use remote servers to store user data and the SQLite database is just an offline-cache or something like that. As far as I can tell, cordova plugins using SQLite just tried to store temporary data in SQLite and were rejected for this. Hence, But if your app uses SQLite for user data, especially as the sole database in a local-only or offline-first app, it's totally fine and actually expected to have the SQLite database be backed up to iCloud. I had people who restored their data from an iCloud backup after getting a new phone lose all of their data, because I'd appreciate an option in the plugin to make this configurable, preferrably using Furthermore, I'd suggest to actually set Pseudo-code to make this more understandable:
|
I've had several users recently report that they lost all of their data after updating the app. I found this answer from stackoverflow very concerning:
What is the reason for marking the db directory as
NSURLIsExcludedFromBackupKey
?The text was updated successfully, but these errors were encountered: