You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Michal Mocny (JIRA)" <ji...@apache.org> on 2012/08/16 22:35:38 UTC

[jira] [Commented] (CB-903) iOS 6 - add setting to set WebKitStoreWebDataForBackup for user defaults from Cordova.plist/config.xml

    [ https://issues.apache.org/jira/browse/CB-903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436287#comment-13436287 ] 

Michal Mocny commented on CB-903:
---------------------------------

Research here reveals:
http://phonegap.com/2012/04/18/ios-5-1-and-the-embedded-uiwebview-with-cordova/
and
https://issues.apache.org/jira/browse/CB-330

I haven't read the whole history, but as I understand it cordova apps almost certainly expect to have persistant web storage, but the spec does not guarantee it, and in ios5.1 they removed that guarantee.  Cordova added a workaround for 5.1 by manually backing up, and that workaround will not be needed in iOS6 since WebKitStoreWebDataForBackup provides that exact functionality.  The Cordova Upgrade Guide even specifically mentions to disable the cordova workaround on iOS6.

So here is my plan, please adjust as necessary:
- Have a single flag for "should persist web storage" (the existing key "BackupWebStorage" isn't perfect but seems fine)
- On ios 5.1 (only?), use our workaround. On ios6+, use the new WebKitStoreWebDataForBackup user default setting. On ios 5.1 or lower, ignore the setting.
- Update the docs to remove references to the issue or ios5/6 quirks, and just mention that persistance can be disabled with a flag on ios5.1+.
                
> iOS 6 - add setting to set WebKitStoreWebDataForBackup for user defaults from Cordova.plist/config.xml
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-903
>                 URL: https://issues.apache.org/jira/browse/CB-903
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>         Environment: iOS 6 DP1
>            Reporter: Shazron Abdullah
>            Assignee: Michal Mocny
>            Priority: Critical
>              Labels: iOS6
>             Fix For: 2.1.0
>
>
> If WebKitStoreWebDataForBackup is set to YES in the app's user defaults, in iOS 6 webkit storage is stored in a directory that will be backed up - add equivalent setting in Cordova.plist/config.xml

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira