Skip to content
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

localStorage should not be backuped on iCloud #107

Closed
vdias38 opened this issue Jun 8, 2015 · 0 comments
Closed

localStorage should not be backuped on iCloud #107

vdias38 opened this issue Jun 8, 2015 · 0 comments
Assignees
Labels

Comments

@vdias38
Copy link
Contributor

vdias38 commented Jun 8, 2015

What occurs

localstorage by default is backuped on cloud, see Cordova iOS Configuration. It can lead to an issue if localStorage of app is synced between multiples devices. Apple's Q&A explains only user data may be stored to the iCloud. Data that is needed for offline purposes may not be stored in the iCloud.

How to reproduce

See #35

Why it happens

More details about localStorage management on iOS:

localStorage in iOS is just a SQLite db file that is stored somewhere on the device.

Phonegap writes the localStorage.db file into the Documents directory for your app.

Specifically: Documents/Backups/localstorage.appdata.db

Since the Documents directory is specific for each app, it will be automatically saved to iCloud.

How to fix it

You can avoid it setting backupwebstorage preference to none on your confix.xml:

xml
<preference name="BackupWebStorage" value="none"/ >

OBS: An issue is open about on phonegap/build: phonegap/build#338
PhoneGap Build Community issue: http://community.phonegap.com/nitobi/topics/backupwebstorage_and_ios

@vdias38 vdias38 added the bug label Jun 8, 2015
@vdias38 vdias38 self-assigned this Jun 8, 2015
@vdias38 vdias38 closed this as completed in 56691ea Jun 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant