Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 82E45DB7C for ; Fri, 24 Aug 2012 00:19:43 +0000 (UTC) Received: (qmail 11833 invoked by uid 500); 24 Aug 2012 00:19:43 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 11784 invoked by uid 500); 24 Aug 2012 00:19:43 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 11656 invoked by uid 99); 24 Aug 2012 00:19:42 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2012 00:19:42 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 682271F52D; Fri, 24 Aug 2012 00:19:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [6/7] ios commit: [ios] On iOS6, set UserDefaults and don't use the LocalStorage Plugin to persists WebStorage Message-Id: <20120824001942.682271F52D@tyr.zones.apache.org> Date: Fri, 24 Aug 2012 00:19:42 +0000 (UTC) [ios] On iOS6, set UserDefaults and don't use the LocalStorage Plugin to persists WebStorage Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/b7741dca Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/b7741dca Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/b7741dca Branch: refs/heads/master Commit: b7741dca88d16f197d05b5ef0f0e4454bca50f29 Parents: 242837e Author: Michal Mocny Authored: Mon Aug 20 14:15:47 2012 -0400 Committer: Michal Mocny Committed: Tue Aug 21 12:51:39 2012 -0400 ---------------------------------------------------------------------- CordovaLib/Classes/CDVViewController.m | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/b7741dca/CordovaLib/Classes/CDVViewController.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index f3b1d73..9ce1d45 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -220,11 +220,14 @@ } /* - * Fire up CDVLocalStorage to work-around iOS 5.1 WebKit storage limitations + * Fire up CDVLocalStorage on iOS 5.1 to work-around WebKit storage limitations, or adjust set user defaults on iOS 6.0+ */ - if (backupWebStorage) { - [self.commandDelegate registerPlugin:[[CDVLocalStorage alloc] initWithWebView:self.webView] withClassName:NSStringFromClass([CDVLocalStorage class])]; + if (IsAtLeastiOSVersion(@"6.0")) { + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"WebKitStoreWebDataForBackup"]; + } else { + [self.commandDelegate registerPlugin:[[CDVLocalStorage alloc] initWithWebView:self.webView] withClassName:NSStringFromClass([CDVLocalStorage class])]; + } } /*