Skip to content
This repository has been archived by the owner on Oct 29, 2022. It is now read-only.

[Build] BackupWebStorage No Longer Works #338

Closed
amirudin opened this issue Aug 11, 2014 · 14 comments
Closed

[Build] BackupWebStorage No Longer Works #338

amirudin opened this issue Aug 11, 2014 · 14 comments
Labels

Comments

@amirudin
Copy link

The following preference is no longer working:
<preference name="BackupWebStorage" value="none"/ >

Original implementation:
#191

@amirudin amirudin added the Bug label Aug 11, 2014
@wildabeast
Copy link
Collaborator

Hi @amirudin, can you share reproduction steps for this failure?

@amirudin
Copy link
Author

Thanks @wildabeast but it will take times to reproduce as it require submitting to Appstore (only Apple can tell). However here is the original discussion leading to this report: https://getsatisfaction.com/nitobi/topics/backupwebstorage_and_ios

@amirudin amirudin changed the title BackupWebStorage No Longer Works [Build] BackupWebStorage No Longer Works Aug 13, 2014
@dmzone
Copy link

dmzone commented Sep 24, 2014

@wildabeast
You can check if the preference works following these steps:

  • Install and launch your app
  • Go to Settings > iCloud > Storage & Backup > Manage Storage
  • If necessary, tap "Show all apps"
  • Check your app's storage

@patrickbense
Copy link

Is there any movement on this? We are experiencing the same issue and need to re-submit to Apple ASAP. We set the preference to local and are going to rebuild but we have no guarentee that this will be successful.

Is there anyone from Phonegap who can help us with this issue?

@letudiantMP
Copy link

Hi
We have exactly the same issue. Is there any way to solve this problem without use

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

@mparpaillon
Copy link

@wildabeast

To reproduce this bug,

cordova create hello com.hello.www hello
cordova platform add ios

Add this to the config.xml file (or local, both are broken)

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

Add some content to your LocalStorage in index.js. Something like

for(var i = 0; i < 5000; i++) {
    localStorage.setItem('wild_' + i, 'Please fix thiiiiiiiiiiiiiis. Thx');
}

Build it (Meh)

cordova build ios

Open the project in Xcode
Build it on a real Device (!= emulator)
When the app has launched
Go to Settings / iCloud / Storage / Manage storage /
Tap on your Device (eg. iPad of wildabeast)
Tap on "Show all apps"

Now wait a few seconds (like 10 or 20... It takes some time to refresh)

And boom the app appears (bottom of the list) ! The local storage is stored in iCloud.
The app will be surely rejected (Sometimes "Apple validators" don't see it or tolerate it... I'm not sure)

Hope you can help us with this.
I've tried a lot of work around (with File API, nothing worked) and I've tested many versions of Cordova (all from 3.6.0-0.2.9)

@mladenp
Copy link

mladenp commented May 4, 2015

So whats up with this? This is important feature that still doesn't work. A lot of apps get rejected because of large documents folder.

@tiagoad
Copy link

tiagoad commented May 8, 2015

Just had two apps rejected because of this issue. Is there any fix?

@mparpaillon
Copy link

You have two possibilities.
Remove Telerik's WKWebView plugin (Telerik-Verified-Plugins/WKWebView#76) or use less LocalStorage.

For now I am not aware of any other option.

@tiagoad
Copy link

tiagoad commented May 8, 2015

I am not using that plugin. However, it seemed the problem was with storage in the Documents directory. I am now using cordova.file.dataDirectory to store my data.

Thanks :)

@wildabeast
Copy link
Collaborator

Created an issue on the Apache Cordova Jira.

@stayted
Copy link

stayted commented May 16, 2015

9 month for a bug (like this)??? It's crazy!

@shazron
Copy link
Member

shazron commented Jun 19, 2015

There is a misconception on what this setting is.

This is solely for backing up your localStorage/websql storage of the WebView to workaround the changes by Apple in iOS 5.1 and greater, where they are not automatically backed up.

"cloud" means that they are backed up by iCloud. "local" means that it is not backed up by iCloud but backed up in Documents/Backups, with the "Backups" folder flagged to not be backed up by iCloud. "none" will not backup anything to anywhere.

The reason "local" saves in "Documents/Backups" is so that it will be backed up by iTunes, so that your app will have the localStorage/webSQL data available when you restore a backup.

If you store anything in Library or Documents (except Library/Caches), it will be backed up by iCloud. For the Cordova File Plugin, to use the Library/Documents folder but not sync it to iCloud, you use the specific extra filesystem: https://github.com/apache/cordova-plugin-file/blob/master/README.md#ios

On a fresh new project, and examining the iCloud data for your app in Settings, you might see that it is enabled and that 0.7kb is being stored. This is your app's preferences file in Library/Preferences, since that does get backed up.

https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html

@wildabeast
Copy link
Collaborator

Closing as expected behaviour, see Shazron's clarifications.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

10 participants