You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2012/08/08 20:59:40 UTC

ios commit: Register CDVURLProtocol in CordovaLibApp's AppDelegate

Updated Branches:
  refs/heads/master 9c51ce779 -> 8a5173e25


Register CDVURLProtocol in CordovaLibApp's AppDelegate

This makes it match the project template's AppDelegate.


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/8a5173e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/8a5173e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/8a5173e2

Branch: refs/heads/master
Commit: 8a5173e25d588a05eb6d3080e026fc38692fde46
Parents: 9c51ce7
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Aug 8 14:58:42 2012 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Aug 8 14:58:42 2012 -0400

----------------------------------------------------------------------
 CordovaLib/CordovaLibApp/AppDelegate.m |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/8a5173e2/CordovaLib/CordovaLibApp/AppDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibApp/AppDelegate.m b/CordovaLib/CordovaLibApp/AppDelegate.m
index 292e376..9e118b7 100644
--- a/CordovaLib/CordovaLibApp/AppDelegate.m
+++ b/CordovaLib/CordovaLibApp/AppDelegate.m
@@ -19,6 +19,7 @@
 
 #import "AppDelegate.h"
 
+#import <Cordova/CDVURLProtocol.h>
 #import "ViewController.h"
 
 @implementation AppDelegate
@@ -26,6 +27,17 @@
 @synthesize window = _window;
 @synthesize viewController = _viewController;
 
+- (id) init
+{ 
+    NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; 
+    [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
+        
+    [CDVURLProtocol registerURLProtocol];
+    
+    self = [super init];
+    return self;
+}
+
 - (void)createViewController {
     NSAssert(!self.viewController, @"ViewController already created.");
     CGRect viewBounds = [[UIScreen mainScreen] applicationFrame];