Open mparpaillon opened 9 years ago
It looks like web data is being stored in /Library/WebKit/ which according to the cordova docs is backed up to iCloud.
That's the default behavior which you can change by setting "BackupWebStorage" preference to "none".
But this doesn't work anymore when WKWebView plugin is installed
From what I can see the default behaviour of setting BackupWebStorage to none without this plugin is to store it in /Library/Caches but it's only when I install the plugin the /Library/WebKit folder is created.
Sorry but what's your point ? are you saying that this is normal ? I think this needs to be fixed
I agree with you that it needs to be fixed, I've just spent the last 3 hours trying to find a solution and just wanted to give some more info to the developer to help him fix it.
Hi @mparpaillon thanks for reporting this. I'm not sure it can be fixed easily, but I'd like to take a look nonetheless. How did you figure out the preference was ignored?
Hi @EddyVerbruggen At first I thought it was a Cordova bug so I created this issue: https://issues.apache.org/jira/browse/CB-8327
You can find there a way to reproduce the bug (Actualy, it won't fail if you don't add WKWebView plugin... that's why nobody answered my issue I guess "-_-)
Has anyone gotten an app approved in the store using this plugin, and if so how? Just wondering before I attempt to submit with it.
Edit: should note, my worry of rejection is due to this bug.
Re @mattlewis92 I see in the CDVLocalStorage it checks here to set the storage to iCloud:
And in WKWebView I see two things: https://github.com/Telerik-Verified-Plugins/WKWebView/blob/e7e7829a696fcca626e5c5dcf8b27054b5c786f0/src/ios/MyMainViewController.m#L178
Could we do a quick and dirty fix by changing any of these things?
I changed this line to be "local" and it seems to not output any iCloud warnings anymore.
@natew that's correct, but you should be able to see the same result by setting <preference name="BackupWebStorage" value="local" />
in config.xml
. Can you confirm that?
I can confirm that the bug still exists even with BackupWebStorage set to local or none in config.xml Changing the line proposed by @natew doesn't seem to fix it. Commenting the 2 blocks of code doesn't either apparently.
@mparpaillon I definitely stopped seeing the warning in the XCode console once I did that.
But no it didn't respect my config file.
The warning may be gone but did you take a look at the iCloud Settings ? I described here the process to test the BackupWebStorage behavior: https://issues.apache.org/jira/browse/CB-8327
That's where Apple looks when they validate (or reject) your application.
That's what I tested when I commented the 2 blocks of code. Without WKWebView plugin I have like 70kb of content in there. When I install the plugin it goes up to 1.1Mb
Didn't look at any settings.
But, for the record my app was accepted :+1: maybe because I don't use much data.
It looks like the option BackupWebStorage no longer works when WKWebView is installed.
It usually allows to configure iCloud behavior. Settings "none" should disabled iCloud backup and it doesn't.
Several apps have been rejected by Apple because of this.