You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2015/03/19 17:55:50 UTC

[01/50] [abbrv] ios commit: CB-7000 - Remove deprecated CDVPlugin and CDVPluginResult methods

Repository: cordova-ios
Updated Branches:
  refs/heads/unplug-whitelist 6c72010fe -> 1ebb298ff (forced update)


CB-7000 - Remove deprecated CDVPlugin and CDVPluginResult methods


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/ffdf7742
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/ffdf7742
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/ffdf7742

Branch: refs/heads/unplug-whitelist
Commit: ffdf7742fecee6dc75e2fb31686aec1a13d2560f
Parents: ef66b33
Author: Shazron Abdullah <sh...@gmail.com>
Authored: Fri Mar 6 17:04:23 2015 -0800
Committer: Shazron Abdullah <sh...@gmail.com>
Committed: Fri Mar 6 17:04:23 2015 -0800

----------------------------------------------------------------------
 CordovaLib/Classes/CDVPlugin.h       | 10 -------
 CordovaLib/Classes/CDVPlugin.m       | 19 -------------
 CordovaLib/Classes/CDVPluginResult.h |  7 -----
 CordovaLib/Classes/CDVPluginResult.m | 47 -------------------------------
 4 files changed, 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ffdf7742/CordovaLib/Classes/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin.h b/CordovaLib/Classes/CDVPlugin.h
index b87685b..b281923 100644
--- a/CordovaLib/Classes/CDVPlugin.h
+++ b/CordovaLib/Classes/CDVPlugin.h
@@ -24,10 +24,6 @@
 #import "CDVCommandDelegate.h"
 #import "CDVWebViewEngineProtocol.h"
 
-#ifdef __IPHONE_8_0
-    #import <WebKit/WebKit.h>
-#endif
-
 @interface UIView (org_apache_cordova_UIView_Extension)
 
 @property (nonatomic, weak) UIScrollView* scrollView;
@@ -71,10 +67,4 @@ extern NSString* const CDVRemoteNotificationError;
 
 - (id)appDelegate;
 
-- (NSString*)writeJavascript:(NSString*)javascript CDV_DEPRECATED(3.6, "Use the CDVCommandDelegate equivalent of evalJs:. This will be removed in 4.0.0");
-
-- (NSString*)success:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId CDV_DEPRECATED(3.6, "Use the CDVCommandDelegate equivalent of sendPluginResult:callbackId. This will be removed in 4.0.0");
-
-- (NSString*)error:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId CDV_DEPRECATED(3.6, "Use the CDVCommandDelegate equivalent of sendPluginResult:callbackId. This will be removed in 4.0.0");
-
 @end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ffdf7742/CordovaLib/Classes/CDVPlugin.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin.m b/CordovaLib/Classes/CDVPlugin.m
index 03c0c73..8cc2eac 100644
--- a/CordovaLib/Classes/CDVPlugin.m
+++ b/CordovaLib/Classes/CDVPlugin.m
@@ -152,25 +152,6 @@ NSString* const CDVRemoteNotificationError = @"CDVRemoteNotificationError";
     return [[UIApplication sharedApplication] delegate];
 }
 
-- (NSString*)writeJavascript:(NSString*)javascript
-{
-    // TODO: although deprecated, should have some solution here instead of removing it
-    [((CDVViewController*)self.viewController).webViewEngine evaluateJavaScript:javascript completionHandler:nil];     // bad cast, but ok for now
-    return @"";
-}
-
-- (NSString*)success:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId
-{
-    [self.commandDelegate evalJs:[pluginResult toSuccessCallbackString:callbackId]];
-    return @"";
-}
-
-- (NSString*)error:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId
-{
-    [self.commandDelegate evalJs:[pluginResult toErrorCallbackString:callbackId]];
-    return @"";
-}
-
 // default implementation does nothing, ideally, we are not registered for notification if we aren't going to do anything.
 // - (void)didReceiveLocalNotification:(NSNotification *)notification
 // {

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ffdf7742/CordovaLib/Classes/CDVPluginResult.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPluginResult.h b/CordovaLib/Classes/CDVPluginResult.h
index e624d4d..7377b12 100644
--- a/CordovaLib/Classes/CDVPluginResult.h
+++ b/CordovaLib/Classes/CDVPluginResult.h
@@ -61,11 +61,4 @@ typedef enum {
 
 - (NSString*)argumentsAsJSON;
 
-// These methods are used by the legacy plugin return result method
-- (NSString*)toJSONString CDV_DEPRECATED(3.6, "Only used by toSuccessCallbackString and toErrorCallbackString which are deprecated. This will be removed in 4.0.0");
-
-- (NSString*)toSuccessCallbackString:(NSString*)callbackId CDV_DEPRECATED(3.6, "Use the CDVCommandDelegate method sendPluginResult:callbackId instead. This will be removed in 4.0.0");
-
-- (NSString*)toErrorCallbackString:(NSString*)callbackId CDV_DEPRECATED(3.6, "Use the CDVCommandDelegate method sendPluginResult:callbackId instead. This will be removed in 4.0.0");
-
 @end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ffdf7742/CordovaLib/Classes/CDVPluginResult.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPluginResult.m b/CordovaLib/Classes/CDVPluginResult.m
index bba70e3..f200c04 100644
--- a/CordovaLib/Classes/CDVPluginResult.m
+++ b/CordovaLib/Classes/CDVPluginResult.m
@@ -163,53 +163,6 @@ id messageFromMultipart(NSArray* theMessages)
     return argumentsJSON;
 }
 
-// These methods are used by the legacy plugin return result method
-- (NSString*)toJSONString
-{
-    NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
-        self.status, @"status",
-        self.message ? self.message : [NSNull null], @"message",
-        self.keepCallback, @"keepCallback",
-        nil];
-
-    NSError* error = nil;
-    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:dict
-                                                       options:NSJSONWritingPrettyPrinted
-                                                         error:&error];
-    NSString* resultString = nil;
-
-    if (error != nil) {
-        NSLog(@"toJSONString error: %@", [error localizedDescription]);
-    } else {
-        resultString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-    }
-
-    if ([[self class] isVerbose]) {
-        NSLog(@"PluginResult:toJSONString - %@", resultString);
-    }
-    return resultString;
-}
-
-- (NSString*)toSuccessCallbackString:(NSString*)callbackId
-{
-    NSString* successCB = [NSString stringWithFormat:@"cordova.callbackSuccess('%@',%@);", callbackId, [self toJSONString]];
-
-    if ([[self class] isVerbose]) {
-        NSLog(@"PluginResult toSuccessCallbackString: %@", successCB);
-    }
-    return successCB;
-}
-
-- (NSString*)toErrorCallbackString:(NSString*)callbackId
-{
-    NSString* errorCB = [NSString stringWithFormat:@"cordova.callbackError('%@',%@);", callbackId, [self toJSONString]];
-
-    if ([[self class] isVerbose]) {
-        NSLog(@"PluginResult toErrorCallbackString: %@", errorCB);
-    }
-    return errorCB;
-}
-
 static BOOL gIsVerbose = NO;
 + (void)setVerbose:(BOOL)verbose
 {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[40/50] [abbrv] ios commit: CB-7767 - Remove usage of NSData+Base64

Posted by ia...@apache.org.
CB-7767 - Remove usage of NSData+Base64


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/4f1ccbe5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/4f1ccbe5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/4f1ccbe5

Branch: refs/heads/unplug-whitelist
Commit: 4f1ccbe55bef4c36cc2ea746ca405b39fa5ec07a
Parents: a65420b
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Mar 18 17:11:55 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Mar 18 17:11:55 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDVInvokedUrlCommand.m | 3 +--
 CordovaLib/Classes/Public/CDVPluginResult.m      | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4f1ccbe5/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m b/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m
index 3a5e8e7..5b4281d 100644
--- a/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m
+++ b/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m
@@ -19,7 +19,6 @@
 
 #import "CDVInvokedUrlCommand.h"
 #import "CDVJSON_private.h"
-#import "NSData+Base64.h"
 
 @implementation CDVInvokedUrlCommand
 
@@ -85,7 +84,7 @@
             newArgs = [NSMutableArray arrayWithArray:_arguments];
             _arguments = newArgs;
         }
-        [newArgs replaceObjectAtIndex:i withObject:[NSData cdv_dataFromBase64String:data]];
+        [newArgs replaceObjectAtIndex:i withObject:[[NSData alloc] initWithBase64EncodedString:data options:0]];
     }
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4f1ccbe5/CordovaLib/Classes/Public/CDVPluginResult.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVPluginResult.m b/CordovaLib/Classes/Public/CDVPluginResult.m
index f200c04..b7a185d 100644
--- a/CordovaLib/Classes/Public/CDVPluginResult.m
+++ b/CordovaLib/Classes/Public/CDVPluginResult.m
@@ -20,7 +20,6 @@
 #import "CDVPluginResult.h"
 #import "CDVJSON_private.h"
 #import "CDVDebug.h"
-#import "NSData+Base64.h"
 
 @interface CDVPluginResult ()
 
@@ -37,7 +36,7 @@ id messageFromArrayBuffer(NSData* data)
 {
     return @{
                @"CDVType" : @"ArrayBuffer",
-               @"data" :[data cdv_base64EncodedString]
+               @"data" :[data base64EncodedStringWithOptions:0]
     };
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[50/50] [abbrv] ios commit: Remove whitelist config.xml parsing

Posted by ia...@apache.org.
Remove whitelist config.xml parsing


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/59550961
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/59550961
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/59550961

Branch: refs/heads/unplug-whitelist
Commit: 595509616b0df8dd7856193db86c9bcdefc22a96
Parents: 57939bc
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Oct 24 16:14:15 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Mar 19 11:06:30 2015 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDVConfigParser.h | 1 -
 CordovaLib/Classes/Public/CDVConfigParser.m | 9 +--------
 2 files changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/59550961/CordovaLib/Classes/Public/CDVConfigParser.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVConfigParser.h b/CordovaLib/Classes/Public/CDVConfigParser.h
index 2e06c88..bae3d0f 100644
--- a/CordovaLib/Classes/Public/CDVConfigParser.h
+++ b/CordovaLib/Classes/Public/CDVConfigParser.h
@@ -24,7 +24,6 @@
 
 @property (nonatomic, readonly, strong) NSMutableDictionary* pluginsDict;
 @property (nonatomic, readonly, strong) NSMutableDictionary* settings;
-@property (nonatomic, readonly, strong) NSMutableArray* whitelistHosts;
 @property (nonatomic, readonly, strong) NSMutableArray* startupPluginNames;
 @property (nonatomic, readonly, strong) NSString* startPage;
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/59550961/CordovaLib/Classes/Public/CDVConfigParser.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVConfigParser.m b/CordovaLib/Classes/Public/CDVConfigParser.m
index 4b73b60..ab32b4a 100644
--- a/CordovaLib/Classes/Public/CDVConfigParser.m
+++ b/CordovaLib/Classes/Public/CDVConfigParser.m
@@ -23,7 +23,6 @@
 
 @property (nonatomic, readwrite, strong) NSMutableDictionary* pluginsDict;
 @property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
-@property (nonatomic, readwrite, strong) NSMutableArray* whitelistHosts;
 @property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
 @property (nonatomic, readwrite, strong) NSString* startPage;
 
@@ -31,7 +30,7 @@
 
 @implementation CDVConfigParser
 
-@synthesize pluginsDict, settings, whitelistHosts, startPage, startupPluginNames;
+@synthesize pluginsDict, settings, startPage, startupPluginNames;
 
 - (id)init
 {
@@ -39,10 +38,6 @@
     if (self != nil) {
         self.pluginsDict = [[NSMutableDictionary alloc] initWithCapacity:30];
         self.settings = [[NSMutableDictionary alloc] initWithCapacity:30];
-        self.whitelistHosts = [[NSMutableArray alloc] initWithCapacity:30];
-        [self.whitelistHosts addObject:@"file:///*"];
-        [self.whitelistHosts addObject:@"content:///*"];
-        [self.whitelistHosts addObject:@"data:///*"];
         self.startupPluginNames = [[NSMutableArray alloc] initWithCapacity:8];
         featureName = nil;
     }
@@ -66,8 +61,6 @@
         if (paramIsOnload || attribIsOnload) {
             [self.startupPluginNames addObject:featureName];
         }
-    } else if ([elementName isEqualToString:@"access"]) {
-        [whitelistHosts addObject:attributeDict[@"origin"]];
     } else if ([elementName isEqualToString:@"content"]) {
         self.startPage = attributeDict[@"src"];
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[10/50] [abbrv] ios commit: Removed unused selectors in CDVViewController.

Posted by ia...@apache.org.
Removed unused selectors in CDVViewController.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/4a466f10
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/4a466f10
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/4a466f10

Branch: refs/heads/unplug-whitelist
Commit: 4a466f1066c9e8c18650894d93cad7269d02980f
Parents: 9f49f5d
Author: Shazron Abdullah <sh...@apache.org>
Authored: Fri Mar 13 17:20:15 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri Mar 13 17:20:15 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVViewController.h | 1 -
 CordovaLib/Classes/CDVViewController.m | 2 --
 2 files changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4a466f10/CordovaLib/Classes/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.h b/CordovaLib/Classes/CDVViewController.h
index 4836f14..e3ead2f 100644
--- a/CordovaLib/Classes/CDVViewController.h
+++ b/CordovaLib/Classes/CDVViewController.h
@@ -83,6 +83,5 @@
 - (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName;
 
 - (BOOL)URLisAllowed:(NSURL*)url;
-- (void)processOpenUrl:(NSURL*)url;
 
 @end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4a466f10/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 79ed2f0..26bfa6e 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -77,8 +77,6 @@
                                                      name:UIApplicationWillEnterForegroundNotification object:nil];
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidEnterBackground:)
                                                      name:UIApplicationDidEnterBackgroundNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPageDidLoad:)
-                                                     name:CDVPageDidLoadNotification object:nil];
 
         // read from UISupportedInterfaceOrientations (or UISupportedInterfaceOrientations~iPad, if its iPad) from -Info.plist
         self.supportedOrientations = [self parseInterfaceOrientations:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[31/50] [abbrv] ios commit: CB-8690 - Group files into folders in CordovaLib/Classes

Posted by ia...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m b/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m
new file mode 100644
index 0000000..252dfaf
--- /dev/null
+++ b/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m
@@ -0,0 +1,487 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVLocalStorage.h"
+#import "CDV.h"
+
+@interface CDVLocalStorage ()
+
+@property (nonatomic, readwrite, strong) NSMutableArray* backupInfo;  // array of CDVBackupInfo objects
+@property (nonatomic, readwrite, weak) id <UIWebViewDelegate> webviewDelegate;
+
+@end
+
+@implementation CDVLocalStorage
+
+@synthesize backupInfo, webviewDelegate;
+
+- (void)pluginInitialize
+{
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResignActive)
+                                                 name:UIApplicationWillResignActiveNotification object:nil];
+    BOOL cloudBackup = [@"cloud" isEqualToString : self.commandDelegate.settings[[@"BackupWebStorage" lowercaseString]]];
+
+    self.backupInfo = [[self class] createBackupInfoWithCloudBackup:cloudBackup];
+}
+
+#pragma mark -
+#pragma mark Plugin interface methods
+
++ (NSMutableArray*)createBackupInfoWithTargetDir:(NSString*)targetDir backupDir:(NSString*)backupDir targetDirNests:(BOOL)targetDirNests backupDirNests:(BOOL)backupDirNests rename:(BOOL)rename
+{
+    /*
+     This "helper" does so much work and has so many options it would probably be clearer to refactor the whole thing.
+     Basically, there are three database locations:
+
+     1. "Normal" dir -- LIB/<nested dires WebKit/LocalStorage etc>/<normal filenames>
+     2. "Caches" dir -- LIB/Caches/<normal filenames>
+     3. "Backup" dir -- DOC/Backups/<renamed filenames>
+
+     And between these three, there are various migration paths, most of which only consider 2 of the 3, which is why this helper is based on 2 locations and has a notion of "direction".
+     */
+    NSMutableArray* backupInfo = [NSMutableArray arrayWithCapacity:3];
+
+    NSString* original;
+    NSString* backup;
+    CDVBackupInfo* backupItem;
+
+    // ////////// LOCALSTORAGE
+
+    original = [targetDir stringByAppendingPathComponent:targetDirNests ? @"WebKit/LocalStorage/file__0.localstorage":@"file__0.localstorage"];
+    backup = [backupDir stringByAppendingPathComponent:(backupDirNests ? @"WebKit/LocalStorage" : @"")];
+    backup = [backup stringByAppendingPathComponent:(rename ? @"localstorage.appdata.db" : @"file__0.localstorage")];
+
+    backupItem = [[CDVBackupInfo alloc] init];
+    backupItem.backup = backup;
+    backupItem.original = original;
+    backupItem.label = @"localStorage database";
+
+    [backupInfo addObject:backupItem];
+
+    // ////////// WEBSQL MAIN DB
+
+    original = [targetDir stringByAppendingPathComponent:targetDirNests ? @"WebKit/LocalStorage/Databases.db":@"Databases.db"];
+    backup = [backupDir stringByAppendingPathComponent:(backupDirNests ? @"WebKit/LocalStorage" : @"")];
+    backup = [backup stringByAppendingPathComponent:(rename ? @"websqlmain.appdata.db" : @"Databases.db")];
+
+    backupItem = [[CDVBackupInfo alloc] init];
+    backupItem.backup = backup;
+    backupItem.original = original;
+    backupItem.label = @"websql main database";
+
+    [backupInfo addObject:backupItem];
+
+    // ////////// WEBSQL DATABASES
+
+    original = [targetDir stringByAppendingPathComponent:targetDirNests ? @"WebKit/LocalStorage/file__0":@"file__0"];
+    backup = [backupDir stringByAppendingPathComponent:(backupDirNests ? @"WebKit/LocalStorage" : @"")];
+    backup = [backup stringByAppendingPathComponent:(rename ? @"websqldbs.appdata.db" : @"file__0")];
+
+    backupItem = [[CDVBackupInfo alloc] init];
+    backupItem.backup = backup;
+    backupItem.original = original;
+    backupItem.label = @"websql databases";
+
+    [backupInfo addObject:backupItem];
+
+    return backupInfo;
+}
+
++ (NSMutableArray*)createBackupInfoWithCloudBackup:(BOOL)cloudBackup
+{
+    // create backup info from backup folder to caches folder
+    NSString* appLibraryFolder = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0];
+    NSString* appDocumentsFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
+    NSString* cacheFolder = [appLibraryFolder stringByAppendingPathComponent:@"Caches"];
+    NSString* backupsFolder = [appDocumentsFolder stringByAppendingPathComponent:@"Backups"];
+
+    // create the backups folder, if needed
+    [[NSFileManager defaultManager] createDirectoryAtPath:backupsFolder withIntermediateDirectories:YES attributes:nil error:nil];
+
+    [self addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:backupsFolder] skip:!cloudBackup];
+
+    return [self createBackupInfoWithTargetDir:cacheFolder backupDir:backupsFolder targetDirNests:NO backupDirNests:NO rename:YES];
+}
+
++ (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL*)URL skip:(BOOL)skip
+{
+    NSError* error = nil;
+    BOOL success = [URL setResourceValue:[NSNumber numberWithBool:skip] forKey:NSURLIsExcludedFromBackupKey error:&error];
+
+    if (!success) {
+        NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
+    }
+    return success;
+}
+
++ (BOOL)copyFrom:(NSString*)src to:(NSString*)dest error:(NSError* __autoreleasing*)error
+{
+    NSFileManager* fileManager = [NSFileManager defaultManager];
+
+    if (![fileManager fileExistsAtPath:src]) {
+        NSString* errorString = [NSString stringWithFormat:@"%@ file does not exist.", src];
+        if (error != NULL) {
+            (*error) = [NSError errorWithDomain:kCDVLocalStorageErrorDomain
+                                           code:kCDVLocalStorageFileOperationError
+                                       userInfo:[NSDictionary dictionaryWithObject:errorString
+                                                                            forKey:NSLocalizedDescriptionKey]];
+        }
+        return NO;
+    }
+
+    // generate unique filepath in temp directory
+    CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault);
+    CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef);
+    NSString* tempBackup = [[NSTemporaryDirectory() stringByAppendingPathComponent:(__bridge NSString*)uuidString] stringByAppendingPathExtension:@"bak"];
+    CFRelease(uuidString);
+    CFRelease(uuidRef);
+
+    BOOL destExists = [fileManager fileExistsAtPath:dest];
+
+    // backup the dest
+    if (destExists && ![fileManager copyItemAtPath:dest toPath:tempBackup error:error]) {
+        return NO;
+    }
+
+    // remove the dest
+    if (destExists && ![fileManager removeItemAtPath:dest error:error]) {
+        return NO;
+    }
+
+    // create path to dest
+    if (!destExists && ![fileManager createDirectoryAtPath:[dest stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:error]) {
+        return NO;
+    }
+
+    // copy src to dest
+    if ([fileManager copyItemAtPath:src toPath:dest error:error]) {
+        // success - cleanup - delete the backup to the dest
+        if ([fileManager fileExistsAtPath:tempBackup]) {
+            [fileManager removeItemAtPath:tempBackup error:error];
+        }
+        return YES;
+    } else {
+        // failure - we restore the temp backup file to dest
+        [fileManager copyItemAtPath:tempBackup toPath:dest error:error];
+        // cleanup - delete the backup to the dest
+        if ([fileManager fileExistsAtPath:tempBackup]) {
+            [fileManager removeItemAtPath:tempBackup error:error];
+        }
+        return NO;
+    }
+}
+
+- (BOOL)shouldBackup
+{
+    for (CDVBackupInfo* info in self.backupInfo) {
+        if ([info shouldBackup]) {
+            return YES;
+        }
+    }
+
+    return NO;
+}
+
+- (BOOL)shouldRestore
+{
+    for (CDVBackupInfo* info in self.backupInfo) {
+        if ([info shouldRestore]) {
+            return YES;
+        }
+    }
+
+    return NO;
+}
+
+/* copy from webkitDbLocation to persistentDbLocation */
+- (void)backup:(CDVInvokedUrlCommand*)command
+{
+    NSString* callbackId = command.callbackId;
+
+    NSError* __autoreleasing error = nil;
+    CDVPluginResult* result = nil;
+    NSString* message = nil;
+
+    for (CDVBackupInfo* info in self.backupInfo) {
+        if ([info shouldBackup]) {
+            [[self class] copyFrom:info.original to:info.backup error:&error];
+
+            if (callbackId) {
+                if (error == nil) {
+                    message = [NSString stringWithFormat:@"Backed up: %@", info.label];
+                    NSLog(@"%@", message);
+
+                    result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];
+                    [self.commandDelegate sendPluginResult:result callbackId:callbackId];
+                } else {
+                    message = [NSString stringWithFormat:@"Error in CDVLocalStorage (%@) backup: %@", info.label, [error localizedDescription]];
+                    NSLog(@"%@", message);
+
+                    result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:message];
+                    [self.commandDelegate sendPluginResult:result callbackId:callbackId];
+                }
+            }
+        }
+    }
+}
+
+/* copy from persistentDbLocation to webkitDbLocation */
+- (void)restore:(CDVInvokedUrlCommand*)command
+{
+    NSError* __autoreleasing error = nil;
+    CDVPluginResult* result = nil;
+    NSString* message = nil;
+
+    for (CDVBackupInfo* info in self.backupInfo) {
+        if ([info shouldRestore]) {
+            [[self class] copyFrom:info.backup to:info.original error:&error];
+
+            if (error == nil) {
+                message = [NSString stringWithFormat:@"Restored: %@", info.label];
+                NSLog(@"%@", message);
+
+                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];
+                [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
+            } else {
+                message = [NSString stringWithFormat:@"Error in CDVLocalStorage (%@) restore: %@", info.label, [error localizedDescription]];
+                NSLog(@"%@", message);
+
+                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:message];
+                [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
+            }
+        }
+    }
+}
+
++ (void)__fixupDatabaseLocationsWithBackupType:(NSString*)backupType
+{
+    [self __verifyAndFixDatabaseLocations];
+    [self __restoreLegacyDatabaseLocationsWithBackupType:backupType];
+}
+
++ (void)__verifyAndFixDatabaseLocations
+{
+    NSBundle* mainBundle = [NSBundle mainBundle];
+    NSString* bundlePath = [[mainBundle bundlePath] stringByDeletingLastPathComponent];
+    NSString* bundleIdentifier = [[mainBundle infoDictionary] objectForKey:@"CFBundleIdentifier"];
+    NSString* appPlistPath = [bundlePath stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Preferences/%@.plist", bundleIdentifier]];
+
+    NSMutableDictionary* appPlistDict = [NSMutableDictionary dictionaryWithContentsOfFile:appPlistPath];
+    BOOL modified = [[self class] __verifyAndFixDatabaseLocationsWithAppPlistDict:appPlistDict
+                                                                       bundlePath:bundlePath
+                                                                      fileManager:[NSFileManager defaultManager]];
+
+    if (modified) {
+        BOOL ok = [appPlistDict writeToFile:appPlistPath atomically:YES];
+        [[NSUserDefaults standardUserDefaults] synchronize];
+        NSLog(@"Fix applied for database locations?: %@", ok ? @"YES" : @"NO");
+    }
+}
+
++ (BOOL)__verifyAndFixDatabaseLocationsWithAppPlistDict:(NSMutableDictionary*)appPlistDict
+                                             bundlePath:(NSString*)bundlePath
+                                            fileManager:(NSFileManager*)fileManager
+{
+    NSString* libraryCaches = @"Library/Caches";
+    NSString* libraryWebKit = @"Library/WebKit";
+
+    NSArray* keysToCheck = [NSArray arrayWithObjects:
+        @"WebKitLocalStorageDatabasePathPreferenceKey",
+        @"WebDatabaseDirectory",
+        nil];
+
+    BOOL dirty = NO;
+
+    for (NSString* key in keysToCheck) {
+        NSString* value = [appPlistDict objectForKey:key];
+        // verify key exists, and path is in app bundle, if not - fix
+        if ((value != nil) && ![value hasPrefix:bundlePath]) {
+            // the pathSuffix to use may be wrong - OTA upgrades from < 5.1 to 5.1 do keep the old path Library/WebKit,
+            // while Xcode synced ones do change the storage location to Library/Caches
+            NSString* newBundlePath = [bundlePath stringByAppendingPathComponent:libraryCaches];
+            if (![fileManager fileExistsAtPath:newBundlePath]) {
+                newBundlePath = [bundlePath stringByAppendingPathComponent:libraryWebKit];
+            }
+            [appPlistDict setValue:newBundlePath forKey:key];
+            dirty = YES;
+        }
+    }
+
+    return dirty;
+}
+
++ (void)__restoreLegacyDatabaseLocationsWithBackupType:(NSString*)backupType
+{
+    // on iOS 6, if you toggle between cloud/local backup, you must move database locations.  Default upgrade from iOS5.1 to iOS6 is like a toggle from local to cloud.
+    NSString* appLibraryFolder = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0];
+    NSString* appDocumentsFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
+
+    NSMutableArray* backupInfo = [NSMutableArray arrayWithCapacity:0];
+
+    if ([backupType isEqualToString:@"cloud"]) {
+#ifdef DEBUG
+            NSLog(@"\n\nStarted backup to iCloud! Please be careful."
+                "\nYour application might be rejected by Apple if you store too much data."
+                "\nFor more information please read \"iOS Data Storage Guidelines\" at:"
+                "\nhttps://developer.apple.com/icloud/documentation/data-storage/"
+                "\nTo disable web storage backup to iCloud, set the BackupWebStorage preference to \"local\" in the Cordova config.xml file\n\n");
+#endif
+        // We would like to restore old backups/caches databases to the new destination (nested in lib folder)
+        [backupInfo addObjectsFromArray:[self createBackupInfoWithTargetDir:appLibraryFolder backupDir:[appDocumentsFolder stringByAppendingPathComponent:@"Backups"] targetDirNests:YES backupDirNests:NO rename:YES]];
+        [backupInfo addObjectsFromArray:[self createBackupInfoWithTargetDir:appLibraryFolder backupDir:[appLibraryFolder stringByAppendingPathComponent:@"Caches"] targetDirNests:YES backupDirNests:NO rename:NO]];
+    } else {
+        // For ios6 local backups we also want to restore from Backups dir -- but we don't need to do that here, since the plugin will do that itself.
+        [backupInfo addObjectsFromArray:[self createBackupInfoWithTargetDir:[appLibraryFolder stringByAppendingPathComponent:@"Caches"] backupDir:appLibraryFolder targetDirNests:NO backupDirNests:YES rename:NO]];
+    }
+
+    NSFileManager* manager = [NSFileManager defaultManager];
+
+    for (CDVBackupInfo* info in backupInfo) {
+        if ([manager fileExistsAtPath:info.backup]) {
+            if ([info shouldRestore]) {
+                NSLog(@"Restoring old webstorage backup. From: '%@' To: '%@'.", info.backup, info.original);
+                [self copyFrom:info.backup to:info.original error:nil];
+            }
+            NSLog(@"Removing old webstorage backup: '%@'.", info.backup);
+            [manager removeItemAtPath:info.backup error:nil];
+        }
+    }
+
+    [[NSUserDefaults standardUserDefaults] setBool:[backupType isEqualToString:@"cloud"] forKey:@"WebKitStoreWebDataForBackup"];
+}
+
+#pragma mark -
+#pragma mark Notification handlers
+
+- (void)onResignActive
+{
+    UIDevice* device = [UIDevice currentDevice];
+    NSNumber* exitsOnSuspend = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIApplicationExitsOnSuspend"];
+
+    BOOL isMultitaskingSupported = [device respondsToSelector:@selector(isMultitaskingSupported)] && [device isMultitaskingSupported];
+
+    if (exitsOnSuspend == nil) { // if it's missing, it should be NO (i.e. multi-tasking on by default)
+        exitsOnSuspend = [NSNumber numberWithBool:NO];
+    }
+
+    if (exitsOnSuspend) {
+        [self backup:nil];
+    } else if (isMultitaskingSupported) {
+        __block UIBackgroundTaskIdentifier backgroundTaskID = UIBackgroundTaskInvalid;
+
+        backgroundTaskID = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
+                [[UIApplication sharedApplication] endBackgroundTask:backgroundTaskID];
+                backgroundTaskID = UIBackgroundTaskInvalid;
+                NSLog(@"Background task to backup WebSQL/LocalStorage expired.");
+            }];
+        CDVLocalStorage __weak* weakSelf = self;
+        [self.commandDelegate runInBackground:^{
+            [weakSelf backup:nil];
+
+            [[UIApplication sharedApplication] endBackgroundTask:backgroundTaskID];
+            backgroundTaskID = UIBackgroundTaskInvalid;
+        }];
+    }
+}
+
+- (void)onAppTerminate
+{
+    [self onResignActive];
+}
+
+- (void)onReset
+{
+    [self restore:nil];
+}
+
+@end
+
+#pragma mark -
+#pragma mark CDVBackupInfo implementation
+
+@implementation CDVBackupInfo
+
+@synthesize original, backup, label;
+
+- (BOOL)file:(NSString*)aPath isNewerThanFile:(NSString*)bPath
+{
+    NSFileManager* fileManager = [NSFileManager defaultManager];
+    NSError* __autoreleasing error = nil;
+
+    NSDictionary* aPathAttribs = [fileManager attributesOfItemAtPath:aPath error:&error];
+    NSDictionary* bPathAttribs = [fileManager attributesOfItemAtPath:bPath error:&error];
+
+    NSDate* aPathModDate = [aPathAttribs objectForKey:NSFileModificationDate];
+    NSDate* bPathModDate = [bPathAttribs objectForKey:NSFileModificationDate];
+
+    if ((nil == aPathModDate) && (nil == bPathModDate)) {
+        return NO;
+    }
+
+    return [aPathModDate compare:bPathModDate] == NSOrderedDescending || bPathModDate == nil;
+}
+
+- (BOOL)item:(NSString*)aPath isNewerThanItem:(NSString*)bPath
+{
+    NSFileManager* fileManager = [NSFileManager defaultManager];
+
+    BOOL aPathIsDir = NO, bPathIsDir = NO;
+    BOOL aPathExists = [fileManager fileExistsAtPath:aPath isDirectory:&aPathIsDir];
+
+    [fileManager fileExistsAtPath:bPath isDirectory:&bPathIsDir];
+
+    if (!aPathExists) {
+        return NO;
+    }
+
+    if (!(aPathIsDir && bPathIsDir)) { // just a file
+        return [self file:aPath isNewerThanFile:bPath];
+    }
+
+    // essentially we want rsync here, but have to settle for our poor man's implementation
+    // we get the files in aPath, and see if it is newer than the file in bPath
+    // (it is newer if it doesn't exist in bPath) if we encounter the FIRST file that is newer,
+    // we return YES
+    NSDirectoryEnumerator* directoryEnumerator = [fileManager enumeratorAtPath:aPath];
+    NSString* path;
+
+    while ((path = [directoryEnumerator nextObject])) {
+        NSString* aPathFile = [aPath stringByAppendingPathComponent:path];
+        NSString* bPathFile = [bPath stringByAppendingPathComponent:path];
+
+        BOOL isNewer = [self file:aPathFile isNewerThanFile:bPathFile];
+        if (isNewer) {
+            return YES;
+        }
+    }
+
+    return NO;
+}
+
+- (BOOL)shouldBackup
+{
+    return [self item:self.original isNewerThanItem:self.backup];
+}
+
+- (BOOL)shouldRestore
+{
+    return [self item:self.backup isNewerThanItem:self.original];
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h
new file mode 100644
index 0000000..d77f191
--- /dev/null
+++ b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h
@@ -0,0 +1,41 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <UIKit/UIKit.h>
+#import "CDVAvailability.h"
+
+/**
+ * Distinguishes top-level navigations from sub-frame navigations.
+ * shouldStartLoadWithRequest is called for every request, but didStartLoad
+ * and didFinishLoad is called only for top-level navigations.
+ * Relevant bug: CB-2389
+ */
+@interface CDVUIWebViewDelegate : NSObject <UIWebViewDelegate>{
+    __weak NSObject <UIWebViewDelegate>* _delegate;
+    NSInteger _loadCount;
+    NSInteger _state;
+    NSInteger _curLoadToken;
+    NSInteger _loadStartPollCount;
+}
+
+- (id)initWithDelegate:(NSObject <UIWebViewDelegate>*)delegate;
+
+- (BOOL)request:(NSURLRequest*)newRequest isEqualToRequestAfterStrippingFragments:(NSURLRequest*)originalRequest;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m
new file mode 100644
index 0000000..01872f6
--- /dev/null
+++ b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m
@@ -0,0 +1,399 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+//
+// Testing shows:
+//
+// In all cases, webView.request.URL is the previous page's URL (or empty) during the didStartLoad callback.
+// When loading a page with a redirect:
+// 1. shouldStartLoading (requestURL is target page)
+// 2. didStartLoading
+// 3. shouldStartLoading (requestURL is redirect target)
+// 4. didFinishLoad (request.URL is redirect target)
+//
+// Note the lack of a second didStartLoading **
+//
+// When loading a page with iframes:
+// 1. shouldStartLoading (requestURL is main page)
+// 2. didStartLoading
+// 3. shouldStartLoading (requestURL is one of the iframes)
+// 4. didStartLoading
+// 5. didFinishLoad
+// 6. didFinishLoad
+//
+// Note there is no way to distinguish which didFinishLoad maps to which didStartLoad **
+//
+// Loading a page by calling window.history.go(-1):
+// 1. didStartLoading
+// 2. didFinishLoad
+//
+// Note the lack of a shouldStartLoading call **
+// Actually - this is fixed on iOS6. iOS6 has a shouldStart. **
+//
+// Loading a page by calling location.reload()
+// 1. shouldStartLoading
+// 2. didStartLoading
+// 3. didFinishLoad
+//
+// Loading a page with an iframe that fails to load:
+// 1. shouldStart (main page)
+// 2. didStart
+// 3. shouldStart (iframe)
+// 4. didStart
+// 5. didFailWithError
+// 6. didFinish
+//
+// Loading a page with an iframe that fails to load due to an invalid URL:
+// 1. shouldStart (main page)
+// 2. didStart
+// 3. shouldStart (iframe)
+// 5. didFailWithError
+// 6. didFinish
+//
+// This case breaks our logic since there is a missing didStart. To prevent this,
+// we check URLs in shouldStart and return NO if they are invalid.
+//
+// Loading a page with an invalid URL
+// 1. shouldStart (main page)
+// 2. didFailWithError
+//
+// TODO: Record order when page is re-navigated before the first navigation finishes.
+//
+
+#import "CDVUIWebViewDelegate.h"
+
+// #define VerboseLog NSLog
+#define VerboseLog(...) do { \
+} while (0)
+
+typedef enum {
+    STATE_IDLE = 0,
+    STATE_WAITING_FOR_LOAD_START = 1,
+    STATE_WAITING_FOR_LOAD_FINISH = 2,
+    STATE_IOS5_POLLING_FOR_LOAD_START = 3,
+    STATE_IOS5_POLLING_FOR_LOAD_FINISH = 4,
+    STATE_CANCELLED = 5
+} State;
+
+static NSString *stripFragment(NSString* url)
+{
+    NSRange r = [url rangeOfString:@"#"];
+
+    if (r.location == NSNotFound) {
+        return url;
+    }
+    return [url substringToIndex:r.location];
+}
+
+@implementation CDVUIWebViewDelegate
+
+- (id)initWithDelegate:(NSObject <UIWebViewDelegate>*)delegate
+{
+    self = [super init];
+    if (self != nil) {
+        _delegate = delegate;
+        _loadCount = -1;
+        _state = STATE_IDLE;
+    }
+    return self;
+}
+
+- (BOOL)request:(NSURLRequest*)newRequest isEqualToRequestAfterStrippingFragments:(NSURLRequest*)originalRequest
+{
+    if (originalRequest.URL && newRequest.URL) {
+        NSString* originalRequestUrl = [originalRequest.URL absoluteString];
+        NSString* newRequestUrl = [newRequest.URL absoluteString];
+
+        NSString* baseOriginalRequestUrl = stripFragment(originalRequestUrl);
+        NSString* baseNewRequestUrl = stripFragment(newRequestUrl);
+        return [baseOriginalRequestUrl isEqualToString:baseNewRequestUrl];
+    }
+
+    return NO;
+}
+
+- (BOOL)isPageLoaded:(UIWebView*)webView
+{
+    NSString* readyState = [webView stringByEvaluatingJavaScriptFromString:@"document.readyState"];
+
+    return [readyState isEqualToString:@"loaded"] || [readyState isEqualToString:@"complete"];
+}
+
+- (BOOL)isJsLoadTokenSet:(UIWebView*)webView
+{
+    NSString* loadToken = [webView stringByEvaluatingJavaScriptFromString:@"window.__cordovaLoadToken"];
+
+    return [[NSString stringWithFormat:@"%ld", (long)_curLoadToken] isEqualToString:loadToken];
+}
+
+- (void)setLoadToken:(UIWebView*)webView
+{
+    _curLoadToken += 1;
+    [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.__cordovaLoadToken=%ld", (long)_curLoadToken]];
+}
+
+- (NSString*)evalForCurrentURL:(UIWebView*)webView
+{
+    return [webView stringByEvaluatingJavaScriptFromString:@"location.href"];
+}
+
+- (void)pollForPageLoadStart:(UIWebView*)webView
+{
+    if (_state != STATE_IOS5_POLLING_FOR_LOAD_START) {
+        return;
+    }
+    if (![self isJsLoadTokenSet:webView]) {
+        VerboseLog(@"Polled for page load start. result = YES!");
+        _state = STATE_IOS5_POLLING_FOR_LOAD_FINISH;
+        [self setLoadToken:webView];
+        if ([_delegate respondsToSelector:@selector(webViewDidStartLoad:)]) {
+            [_delegate webViewDidStartLoad:webView];
+        }
+        [self pollForPageLoadFinish:webView];
+    } else {
+        VerboseLog(@"Polled for page load start. result = NO");
+        // Poll only for 1 second, and then fall back on checking only when delegate methods are called.
+        ++_loadStartPollCount;
+        if (_loadStartPollCount < (1000 * .05)) {
+            [self performSelector:@selector(pollForPageLoadStart:) withObject:webView afterDelay:.05];
+        }
+    }
+}
+
+- (void)pollForPageLoadFinish:(UIWebView*)webView
+{
+    if (_state != STATE_IOS5_POLLING_FOR_LOAD_FINISH) {
+        return;
+    }
+    if ([self isPageLoaded:webView]) {
+        VerboseLog(@"Polled for page load finish. result = YES!");
+        _state = STATE_IDLE;
+        if ([_delegate respondsToSelector:@selector(webViewDidFinishLoad:)]) {
+            [_delegate webViewDidFinishLoad:webView];
+        }
+    } else {
+        VerboseLog(@"Polled for page load finish. result = NO");
+        [self performSelector:@selector(pollForPageLoadFinish:) withObject:webView afterDelay:.05];
+    }
+}
+
+- (BOOL)shouldLoadRequest:(NSURLRequest*)request
+{
+    NSString* scheme = [[request URL] scheme];
+
+    if ([scheme isEqualToString:@"mailto"] || [scheme isEqualToString:@"tel"]) {
+        return YES;
+    }
+
+    return [NSURLConnection canHandleRequest:request];
+}
+
+- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
+{
+    BOOL shouldLoad = YES;
+
+    if ([_delegate respondsToSelector:@selector(webView:shouldStartLoadWithRequest:navigationType:)]) {
+        shouldLoad = [_delegate webView:webView shouldStartLoadWithRequest:request navigationType:navigationType];
+    }
+
+    VerboseLog(@"webView shouldLoad=%d (before) state=%d loadCount=%d URL=%@", shouldLoad, _state, _loadCount, request.URL);
+
+    if (shouldLoad) {
+        // When devtools refresh occurs, it blindly uses the same request object. If a history.replaceState() has occured, then
+        // mainDocumentURL != URL even though it's a top-level navigation.
+        BOOL isDevToolsRefresh = (request == webView.request);
+        BOOL isTopLevelNavigation = isDevToolsRefresh || [request.URL isEqual:[request mainDocumentURL]];
+        if (isTopLevelNavigation) {
+            // Ignore hash changes that don't navigate to a different page.
+            // webView.request does actually update when history.replaceState() gets called.
+            if ([self request:request isEqualToRequestAfterStrippingFragments:webView.request]) {
+                NSString* prevURL = [self evalForCurrentURL:webView];
+                if ([prevURL isEqualToString:[request.URL absoluteString]]) {
+                    VerboseLog(@"Page reload detected.");
+                } else {
+                    VerboseLog(@"Detected hash change shouldLoad");
+                    return shouldLoad;
+                }
+            }
+
+            switch (_state) {
+                case STATE_WAITING_FOR_LOAD_FINISH:
+                    // Redirect case.
+                    // We expect loadCount == 1.
+                    if (_loadCount != 1) {
+                        NSLog(@"CDVWebViewDelegate: Detected redirect when loadCount=%ld", (long)_loadCount);
+                    }
+                    break;
+
+                case STATE_IDLE:
+                case STATE_IOS5_POLLING_FOR_LOAD_START:
+                case STATE_CANCELLED:
+                    // Page navigation start.
+                    _loadCount = 0;
+                    _state = STATE_WAITING_FOR_LOAD_START;
+                    break;
+
+                default:
+                    {
+                        _loadCount = 0;
+                        _state = STATE_WAITING_FOR_LOAD_START;
+                        NSString* description = [NSString stringWithFormat:@"CDVWebViewDelegate: Navigation started when state=%ld", (long)_state];
+                        NSLog(@"%@", description);
+                        if ([_delegate respondsToSelector:@selector(webView:didFailLoadWithError:)]) {
+                            NSDictionary* errorDictionary = @{NSLocalizedDescriptionKey : description};
+                            NSError* error = [[NSError alloc] initWithDomain:@"CDVUIWebViewDelegate" code:1 userInfo:errorDictionary];
+                            [_delegate webView:webView didFailLoadWithError:error];
+                        }
+                    }
+            }
+        } else {
+            // Deny invalid URLs so that we don't get the case where we go straight from
+            // webViewShouldLoad -> webViewDidFailLoad (messes up _loadCount).
+            shouldLoad = shouldLoad && [self shouldLoadRequest:request];
+        }
+        VerboseLog(@"webView shouldLoad=%d (after) isTopLevelNavigation=%d state=%d loadCount=%d", shouldLoad, isTopLevelNavigation, _state, _loadCount);
+    }
+    return shouldLoad;
+}
+
+- (void)webViewDidStartLoad:(UIWebView*)webView
+{
+    VerboseLog(@"webView didStartLoad (before). state=%d loadCount=%d", _state, _loadCount);
+    BOOL fireCallback = NO;
+    switch (_state) {
+        case STATE_IDLE:
+            break;
+
+        case STATE_CANCELLED:
+            fireCallback = YES;
+            _state = STATE_WAITING_FOR_LOAD_FINISH;
+            _loadCount += 1;
+            break;
+
+        case STATE_WAITING_FOR_LOAD_START:
+            if (_loadCount != 0) {
+                NSLog(@"CDVWebViewDelegate: Unexpected loadCount in didStart. count=%ld", (long)_loadCount);
+            }
+            fireCallback = YES;
+            _state = STATE_WAITING_FOR_LOAD_FINISH;
+            _loadCount = 1;
+            break;
+
+        case STATE_WAITING_FOR_LOAD_FINISH:
+            _loadCount += 1;
+            break;
+
+        case STATE_IOS5_POLLING_FOR_LOAD_START:
+            [self pollForPageLoadStart:webView];
+            break;
+
+        case STATE_IOS5_POLLING_FOR_LOAD_FINISH:
+            [self pollForPageLoadFinish:webView];
+            break;
+
+        default:
+            NSLog(@"CDVWebViewDelegate: Unexpected didStart with state=%ld loadCount=%ld", (long)_state, (long)_loadCount);
+    }
+    VerboseLog(@"webView didStartLoad (after). state=%d loadCount=%d fireCallback=%d", _state, _loadCount, fireCallback);
+    if (fireCallback && [_delegate respondsToSelector:@selector(webViewDidStartLoad:)]) {
+        [_delegate webViewDidStartLoad:webView];
+    }
+}
+
+- (void)webViewDidFinishLoad:(UIWebView*)webView
+{
+    VerboseLog(@"webView didFinishLoad (before). state=%d loadCount=%d", _state, _loadCount);
+    BOOL fireCallback = NO;
+    switch (_state) {
+        case STATE_IDLE:
+            break;
+
+        case STATE_WAITING_FOR_LOAD_START:
+            NSLog(@"CDVWebViewDelegate: Unexpected didFinish while waiting for load start.");
+            break;
+
+        case STATE_WAITING_FOR_LOAD_FINISH:
+            if (_loadCount == 1) {
+                fireCallback = YES;
+                _state = STATE_IDLE;
+            }
+            _loadCount -= 1;
+            break;
+
+        case STATE_IOS5_POLLING_FOR_LOAD_START:
+            [self pollForPageLoadStart:webView];
+            break;
+
+        case STATE_IOS5_POLLING_FOR_LOAD_FINISH:
+            [self pollForPageLoadFinish:webView];
+            break;
+    }
+    VerboseLog(@"webView didFinishLoad (after). state=%d loadCount=%d fireCallback=%d", _state, _loadCount, fireCallback);
+    if (fireCallback && [_delegate respondsToSelector:@selector(webViewDidFinishLoad:)]) {
+        [_delegate webViewDidFinishLoad:webView];
+    }
+}
+
+- (void)webView:(UIWebView*)webView didFailLoadWithError:(NSError*)error
+{
+    VerboseLog(@"webView didFailLoad (before). state=%d loadCount=%d", _state, _loadCount);
+    BOOL fireCallback = NO;
+
+    switch (_state) {
+        case STATE_IDLE:
+            break;
+
+        case STATE_WAITING_FOR_LOAD_START:
+            if ([error code] == NSURLErrorCancelled) {
+                _state = STATE_CANCELLED;
+            } else {
+                _state = STATE_IDLE;
+            }
+            fireCallback = YES;
+            break;
+
+        case STATE_WAITING_FOR_LOAD_FINISH:
+            if ([error code] != NSURLErrorCancelled) {
+                if (_loadCount == 1) {
+                    _state = STATE_IDLE;
+                    fireCallback = YES;
+                }
+                _loadCount = -1;
+            } else {
+                fireCallback = YES;
+                _state = STATE_CANCELLED;
+                _loadCount -= 1;
+            }
+            break;
+
+        case STATE_IOS5_POLLING_FOR_LOAD_START:
+            [self pollForPageLoadStart:webView];
+            break;
+
+        case STATE_IOS5_POLLING_FOR_LOAD_FINISH:
+            [self pollForPageLoadFinish:webView];
+            break;
+    }
+    VerboseLog(@"webView didFailLoad (after). state=%d loadCount=%d, fireCallback=%d", _state, _loadCount, fireCallback);
+    if (fireCallback && [_delegate respondsToSelector:@selector(webView:didFailLoadWithError:)]) {
+        [_delegate webView:webView didFailLoadWithError:error];
+    }
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h
new file mode 100644
index 0000000..6a9ee77
--- /dev/null
+++ b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h
@@ -0,0 +1,27 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVPlugin.h"
+#import "CDVWebViewEngineProtocol.h"
+
+@interface CDVUIWebViewEngine : CDVPlugin <CDVWebViewEngineProtocol>
+
+@property (nonatomic, strong, readonly) id <UIWebViewDelegate> uiWebViewDelegate;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m
new file mode 100644
index 0000000..3e01b08
--- /dev/null
+++ b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m
@@ -0,0 +1,186 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVUIWebViewEngine.h"
+#import "CDVUIWebViewDelegate.h"
+#import "NSDictionary+CordovaPreferences.h"
+
+#import <objc/message.h>
+
+@interface CDVUIWebViewEngine ()
+
+@property (nonatomic, strong, readwrite) UIView* engineWebView;
+@property (nonatomic, strong, readwrite) id <UIWebViewDelegate> uiWebViewDelegate;
+
+@end
+
+@implementation CDVUIWebViewEngine
+
+@synthesize engineWebView = _engineWebView;
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super init];
+    if (self) {
+        self.engineWebView = [[UIWebView alloc] initWithFrame:frame];
+        NSLog(@"Using UIWebView");
+    }
+
+    return self;
+}
+
+- (void)pluginInitialize
+{
+    // viewController would be available now. we attempt to set all possible delegates to it, by default
+
+    UIWebView* uiWebView = (UIWebView*)_engineWebView;
+
+    if ([self.viewController conformsToProtocol:@protocol(UIWebViewDelegate)]) {
+        self.uiWebViewDelegate = [[CDVUIWebViewDelegate alloc] initWithDelegate:(id <UIWebViewDelegate>)self.viewController];
+        uiWebView.delegate = self.uiWebViewDelegate;
+    }
+
+    [self updateSettings:self.commandDelegate.settings];
+}
+
+- (void)evaluateJavaScript:(NSString*)javaScriptString completionHandler:(void (^)(id, NSError*))completionHandler
+{
+    NSString* ret = [(UIWebView*)_engineWebView stringByEvaluatingJavaScriptFromString:javaScriptString];
+
+    if (completionHandler) {
+        completionHandler(ret, nil);
+    }
+}
+
+- (id)loadRequest:(NSURLRequest*)request
+{
+    [(UIWebView*)_engineWebView loadRequest:request];
+    return nil;
+}
+
+- (id)loadHTMLString:(NSString*)string baseURL:(NSURL*)baseURL
+{
+    [(UIWebView*)_engineWebView loadHTMLString:string baseURL:baseURL];
+    return nil;
+}
+
+- (NSURL*)URL
+{
+    return [[(UIWebView*)_engineWebView request] URL];
+}
+
+- (void)updateSettings:(NSDictionary*)settings
+{
+    UIWebView* uiWebView = (UIWebView*)_engineWebView;
+
+    uiWebView.scalesPageToFit = [settings cordovaBoolSettingForKey:@"EnableViewportScale" defaultValue:NO];
+    uiWebView.allowsInlineMediaPlayback = [settings cordovaBoolSettingForKey:@"AllowInlineMediaPlayback" defaultValue:NO];
+    uiWebView.mediaPlaybackRequiresUserAction = [settings cordovaBoolSettingForKey:@"MediaPlaybackRequiresUserAction" defaultValue:YES];
+    uiWebView.mediaPlaybackAllowsAirPlay = [settings cordovaBoolSettingForKey:@"MediaPlaybackAllowsAirPlay" defaultValue:YES];
+    uiWebView.keyboardDisplayRequiresUserAction = [settings cordovaBoolSettingForKey:@"KeyboardDisplayRequiresUserAction" defaultValue:YES];
+    uiWebView.suppressesIncrementalRendering = [settings cordovaBoolSettingForKey:@"SuppressesIncrementalRendering" defaultValue:NO];
+    uiWebView.gapBetweenPages = [settings cordovaFloatSettingForKey:@"GapBetweenPages" defaultValue:0.0];
+    uiWebView.pageLength = [settings cordovaFloatSettingForKey:@"PageLength" defaultValue:0.0];
+
+    id prefObj = nil;
+
+    // By default, DisallowOverscroll is false (thus bounce is allowed)
+    BOOL bounceAllowed = !([settings cordovaBoolSettingForKey:@"DisallowOverscroll" defaultValue:NO]);
+
+    // prevent webView from bouncing
+    if (!bounceAllowed) {
+        if ([self.webView respondsToSelector:@selector(scrollView)]) {
+            ((UIScrollView*)[uiWebView scrollView]).bounces = NO;
+        } else {
+            for (id subview in self.webView.subviews) {
+                if ([[subview class] isSubclassOfClass:[UIScrollView class]]) {
+                    ((UIScrollView*)subview).bounces = NO;
+                }
+            }
+        }
+    }
+
+    NSString* decelerationSetting = [settings cordovaSettingForKey:@"UIWebViewDecelerationSpeed"];
+    if (![@"fast" isEqualToString:decelerationSetting]) {
+        [uiWebView.scrollView setDecelerationRate:UIScrollViewDecelerationRateNormal];
+    }
+
+    NSInteger paginationBreakingMode = 0; // default - UIWebPaginationBreakingModePage
+    prefObj = [settings cordovaSettingForKey:@"PaginationBreakingMode"];
+    if (prefObj != nil) {
+        NSArray* validValues = @[@"page", @"column"];
+        NSString* prefValue = [validValues objectAtIndex:0];
+
+        if ([prefObj isKindOfClass:[NSString class]]) {
+            prefValue = prefObj;
+        }
+
+        paginationBreakingMode = [validValues indexOfObject:[prefValue lowercaseString]];
+        if (paginationBreakingMode == NSNotFound) {
+            paginationBreakingMode = 0;
+        }
+    }
+    uiWebView.paginationBreakingMode = paginationBreakingMode;
+
+    NSInteger paginationMode = 0; // default - UIWebPaginationModeUnpaginated
+    prefObj = [settings cordovaSettingForKey:@"PaginationMode"];
+    if (prefObj != nil) {
+        NSArray* validValues = @[@"unpaginated", @"lefttoright", @"toptobottom", @"bottomtotop", @"righttoleft"];
+        NSString* prefValue = [validValues objectAtIndex:0];
+
+        if ([prefObj isKindOfClass:[NSString class]]) {
+            prefValue = prefObj;
+        }
+
+        paginationMode = [validValues indexOfObject:[prefValue lowercaseString]];
+        if (paginationMode == NSNotFound) {
+            paginationMode = 0;
+        }
+    }
+    uiWebView.paginationMode = paginationMode;
+}
+
+- (void)updateWithInfo:(NSDictionary*)info
+{
+    UIWebView* uiWebView = (UIWebView*)_engineWebView;
+
+    id <UIWebViewDelegate> uiWebViewDelegate = [info objectForKey:kCDVWebViewEngineUIWebViewDelegate];
+    NSDictionary* settings = [info objectForKey:kCDVWebViewEngineWebViewPreferences];
+
+    if (uiWebViewDelegate &&
+        [uiWebViewDelegate conformsToProtocol:@protocol(UIWebViewDelegate)]) {
+        self.uiWebViewDelegate = [[CDVUIWebViewDelegate alloc] initWithDelegate:(id <UIWebViewDelegate>)self.viewController];
+        uiWebView.delegate = self.uiWebViewDelegate;
+    }
+
+    if (settings && [settings isKindOfClass:[NSDictionary class]]) {
+        [self updateSettings:settings];
+    }
+}
+
+// This forwards the methods that are in the header that are not implemented here.
+// Both WKWebView and UIWebView implement the below:
+//     loadHTMLString:baseURL:
+//     loadRequest:
+- (id)forwardingTargetForSelector:(SEL)aSelector
+{
+    return _engineWebView;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDV.h b/CordovaLib/Classes/Public/CDV.h
new file mode 100644
index 0000000..fbeaea2
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDV.h
@@ -0,0 +1,36 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVAvailability.h"
+#import "CDVAvailabilityDeprecated.h"
+#import "CDVAppDelegate.h"
+#import "CDVPlugin.h"
+#import "CDVPluginResult.h"
+#import "CDVViewController.h"
+#import "CDVCommandDelegate.h"
+#import "CDVURLProtocol.h"
+#import "CDVInvokedUrlCommand.h"
+#import "CDVWhitelist.h"
+#import "CDVLocalStorage.h"
+#import "CDVPlugin.h"
+#import "CDVPluginResult.h"
+#import "CDVScreenOrientationDelegate.h"
+#import "CDVTimer.h"
+#import "CDVUserAgentUtil.h"
+#import "NSData+Base64.h"

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVAppDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVAppDelegate.h b/CordovaLib/Classes/Public/CDVAppDelegate.h
new file mode 100644
index 0000000..de5b518
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVAppDelegate.h
@@ -0,0 +1,28 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CDVViewController.h"
+
+@interface CDVAppDelegate : NSObject <UIApplicationDelegate>{}
+
+@property (nonatomic, strong) IBOutlet UIWindow* window;
+@property (nonatomic, strong) IBOutlet CDVViewController* viewController;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVAppDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVAppDelegate.m b/CordovaLib/Classes/Public/CDVAppDelegate.m
new file mode 100644
index 0000000..52f5837
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVAppDelegate.m
@@ -0,0 +1,101 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVAppDelegate.h"
+
+@implementation CDVAppDelegate
+
+@synthesize window, viewController;
+
+- (id)init
+{
+    /** If you need to do any extra app-specific initialization, you can do it here
+     *  -jm
+     **/
+    NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
+
+    [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
+
+    int cacheSizeMemory = 8 * 1024 * 1024; // 8MB
+    int cacheSizeDisk = 32 * 1024 * 1024; // 32MB
+    NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
+    [NSURLCache setSharedURLCache:sharedCache];
+
+    self = [super init];
+    return self;
+}
+
+#pragma mark UIApplicationDelegate implementation
+
+/**
+ * This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up)
+ */
+- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
+{
+    CGRect screenBounds = [[UIScreen mainScreen] bounds];
+
+    self.window = [[UIWindow alloc] initWithFrame:screenBounds];
+    self.window.autoresizesSubviews = YES;
+
+    // only set if not already set in subclass
+    if (self.viewController == nil) {
+        self.viewController = [[CDVViewController alloc] init];
+    }
+
+    // Set your app's start page by setting the <content src='foo.html' /> tag in config.xml.
+    // If necessary, uncomment the line below to override it.
+    // self.viewController.startPage = @"index.html";
+
+    // NOTE: To customize the view's frame size (which defaults to full screen), override
+    // [self.viewController viewWillAppear:] in your view controller.
+
+    self.window.rootViewController = self.viewController;
+    [self.window makeKeyAndVisible];
+
+    return YES;
+}
+
+// this happens while we are running ( in the background, or from within our own app )
+// only valid if 40x-Info.plist specifies a protocol to handle
+- (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation
+{
+    if (!url) {
+        return NO;
+    }
+
+    // all plugins will get the notification, and their handlers will be called
+    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
+
+    return YES;
+}
+
+- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
+{
+    // iPhone doesn't support upside down by default, while the iPad does.  Override to allow all orientations always, and let the root view controller decide what's allowed (the supported orientations mask gets intersected).
+    NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown);
+
+    return supportedInterfaceOrientations;
+}
+
+- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application
+{
+    [[NSURLCache sharedURLCache] removeAllCachedResponses];
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVAvailability.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVAvailability.h b/CordovaLib/Classes/Public/CDVAvailability.h
new file mode 100644
index 0000000..40d5489
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVAvailability.h
@@ -0,0 +1,96 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVAvailabilityDeprecated.h"
+
+#define __CORDOVA_IOS__
+
+#define __CORDOVA_0_9_6 906
+#define __CORDOVA_1_0_0 10000
+#define __CORDOVA_1_1_0 10100
+#define __CORDOVA_1_2_0 10200
+#define __CORDOVA_1_3_0 10300
+#define __CORDOVA_1_4_0 10400
+#define __CORDOVA_1_4_1 10401
+#define __CORDOVA_1_5_0 10500
+#define __CORDOVA_1_6_0 10600
+#define __CORDOVA_1_6_1 10601
+#define __CORDOVA_1_7_0 10700
+#define __CORDOVA_1_8_0 10800
+#define __CORDOVA_1_8_1 10801
+#define __CORDOVA_1_9_0 10900
+#define __CORDOVA_2_0_0 20000
+#define __CORDOVA_2_1_0 20100
+#define __CORDOVA_2_2_0 20200
+#define __CORDOVA_2_3_0 20300
+#define __CORDOVA_2_4_0 20400
+#define __CORDOVA_2_5_0 20500
+#define __CORDOVA_2_6_0 20600
+#define __CORDOVA_2_7_0 20700
+#define __CORDOVA_2_8_0 20800
+#define __CORDOVA_2_9_0 20900
+#define __CORDOVA_3_0_0 30000
+#define __CORDOVA_3_1_0 30100
+#define __CORDOVA_3_2_0 30200
+#define __CORDOVA_3_3_0 30300
+#define __CORDOVA_3_4_0 30400
+#define __CORDOVA_3_4_1 30401
+#define __CORDOVA_3_5_0 30500
+#define __CORDOVA_3_6_0 30600
+#define __CORDOVA_3_7_0 30700
+#define __CORDOVA_3_8_0 30800
+#define __CORDOVA_4_0_0 40000
+/* coho:next-version,insert-before */
+#define __CORDOVA_NA 99999      /* not available */
+
+/*
+ #if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_4_0_0
+    // do something when its at least 4.0.0
+ #else
+    // do something else (non 4.0.0)
+ #endif
+ */
+#ifndef CORDOVA_VERSION_MIN_REQUIRED
+    /* coho:next-version-min-required,replace-after */
+    #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_4_0_0
+#endif
+
+/*
+ Returns YES if it is at least version specified as NSString(X)
+ Usage:
+     if (IsAtLeastiOSVersion(@"5.1")) {
+         // do something for iOS 5.1 or greater
+     }
+ */
+#define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending)
+
+/* Return the string version of the decimal version */
+#define CDV_VERSION [NSString stringWithFormat:@"%d.%d.%d", \
+    (CORDOVA_VERSION_MIN_REQUIRED / 10000),                 \
+    (CORDOVA_VERSION_MIN_REQUIRED % 10000) / 100,           \
+    (CORDOVA_VERSION_MIN_REQUIRED % 10000) % 100]
+
+// Enable this to log all exec() calls.
+#define CDV_ENABLE_EXEC_LOGGING 0
+#if CDV_ENABLE_EXEC_LOGGING
+    #define CDV_EXEC_LOG NSLog
+#else
+    #define CDV_EXEC_LOG(...) do { \
+} while (NO)
+#endif

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h b/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h
new file mode 100644
index 0000000..abf7a16
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h
@@ -0,0 +1,26 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <UIKit/UIKit.h>
+
+#ifdef __clang__
+    #define CDV_DEPRECATED(version, msg) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg)))
+#else
+    #define CDV_DEPRECATED(version, msg) __attribute__((deprecated()))
+#endif

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVCommandDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVCommandDelegate.h b/CordovaLib/Classes/Public/CDVCommandDelegate.h
new file mode 100644
index 0000000..926278a
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVCommandDelegate.h
@@ -0,0 +1,53 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVAvailability.h"
+#import "CDVInvokedUrlCommand.h"
+
+@class CDVPlugin;
+@class CDVPluginResult;
+@class CDVWhitelist;
+
+typedef NSURL* (^ UrlTransformerBlock)(NSURL*);
+
+@protocol CDVCommandDelegate <NSObject>
+
+@property (nonatomic, readonly) NSDictionary* settings;
+@property (nonatomic, copy) UrlTransformerBlock urlTransformer;
+
+- (NSString*)pathForResource:(NSString*)resourcepath;
+- (id)getCommandInstance:(NSString*)pluginName;
+
+// Sends a plugin result to the JS. This is thread-safe.
+- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId;
+// Evaluates the given JS. This is thread-safe.
+- (void)evalJs:(NSString*)js;
+// Can be used to evaluate JS right away instead of scheduling it on the run-loop.
+// This is required for dispatch resign and pause events, but should not be used
+// without reason. Without the run-loop delay, alerts used in JS callbacks may result
+// in dead-lock. This method must be called from the UI thread.
+- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop;
+// Runs the given block on a background thread using a shared thread-pool.
+- (void)runInBackground:(void (^)())block;
+// Returns the User-Agent of the associated UIWebView.
+- (NSString*)userAgent;
+// Returns whether the given URL passes the white-list.
+- (BOOL)URLIsWhitelisted:(NSURL*)url;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVCommandDelegateImpl.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVCommandDelegateImpl.h b/CordovaLib/Classes/Public/CDVCommandDelegateImpl.h
new file mode 100644
index 0000000..0531134
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVCommandDelegateImpl.h
@@ -0,0 +1,36 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <UIKit/UIKit.h>
+#import "CDVCommandDelegate.h"
+
+@class CDVViewController;
+@class CDVCommandQueue;
+
+@interface CDVCommandDelegateImpl : NSObject <CDVCommandDelegate>{
+    @private
+    __weak CDVViewController* _viewController;
+    NSRegularExpression* _callbackIdPattern;
+    @protected
+    __weak CDVCommandQueue* _commandQueue;
+    BOOL _delayResponses;
+}
+- (id)initWithViewController:(CDVViewController*)viewController;
+- (void)flushCommandQueueWithDelayedJs;
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m b/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m
new file mode 100644
index 0000000..d4df6c3
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m
@@ -0,0 +1,187 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVCommandDelegateImpl.h"
+#import "CDVJSON_private.h"
+#import "CDVCommandQueue.h"
+#import "CDVPluginResult.h"
+#import "CDVViewController.h"
+
+@implementation CDVCommandDelegateImpl
+
+@synthesize urlTransformer;
+
+- (id)initWithViewController:(CDVViewController*)viewController
+{
+    self = [super init];
+    if (self != nil) {
+        _viewController = viewController;
+        _commandQueue = _viewController.commandQueue;
+
+        NSError* err = nil;
+        _callbackIdPattern = [NSRegularExpression regularExpressionWithPattern:@"[^A-Za-z0-9._-]" options:0 error:&err];
+        if (err != nil) {
+            // Couldn't initialize Regex
+            NSLog(@"Error: Couldn't initialize regex");
+            _callbackIdPattern = nil;
+        }
+    }
+    return self;
+}
+
+- (NSString*)pathForResource:(NSString*)resourcepath
+{
+    NSBundle* mainBundle = [NSBundle mainBundle];
+    NSMutableArray* directoryParts = [NSMutableArray arrayWithArray:[resourcepath componentsSeparatedByString:@"/"]];
+    NSString* filename = [directoryParts lastObject];
+
+    [directoryParts removeLastObject];
+
+    NSString* directoryPartsJoined = [directoryParts componentsJoinedByString:@"/"];
+    NSString* directoryStr = _viewController.wwwFolderName;
+
+    if ([directoryPartsJoined length] > 0) {
+        directoryStr = [NSString stringWithFormat:@"%@/%@", _viewController.wwwFolderName, [directoryParts componentsJoinedByString:@"/"]];
+    }
+
+    return [mainBundle pathForResource:filename ofType:@"" inDirectory:directoryStr];
+}
+
+- (void)flushCommandQueueWithDelayedJs
+{
+    _delayResponses = YES;
+    [_commandQueue executePending];
+    _delayResponses = NO;
+}
+
+- (void)evalJsHelper2:(NSString*)js
+{
+    CDV_EXEC_LOG(@"Exec: evalling: %@", [js substringToIndex:MIN([js length], 160)]);
+    [_viewController.webViewEngine evaluateJavaScript:js completionHandler:^(id obj, NSError* error) {
+        // TODO: obj can be something other than string
+        if ([obj isKindOfClass:[NSString class]]) {
+            NSString* commandsJSON = (NSString*)obj;
+            if ([commandsJSON length] > 0) {
+                CDV_EXEC_LOG(@"Exec: Retrieved new exec messages by chaining.");
+            }
+
+            [_commandQueue enqueueCommandBatch:commandsJSON];
+            [_commandQueue executePending];
+        }
+    }];
+}
+
+- (void)evalJsHelper:(NSString*)js
+{
+    // Cycle the run-loop before executing the JS.
+    // For _delayResponses -
+    //    This ensures that we don't eval JS during the middle of an existing JS
+    //    function (possible since UIWebViewDelegate callbacks can be synchronous).
+    // For !isMainThread -
+    //    It's a hard error to eval on the non-UI thread.
+    // For !_commandQueue.currentlyExecuting -
+    //     This works around a bug where sometimes alerts() within callbacks can cause
+    //     dead-lock.
+    //     If the commandQueue is currently executing, then we know that it is safe to
+    //     execute the callback immediately.
+    // Using    (dispatch_get_main_queue()) does *not* fix deadlocks for some reason,
+    // but performSelectorOnMainThread: does.
+    if (_delayResponses || ![NSThread isMainThread] || !_commandQueue.currentlyExecuting) {
+        [self performSelectorOnMainThread:@selector(evalJsHelper2:) withObject:js waitUntilDone:NO];
+    } else {
+        [self evalJsHelper2:js];
+    }
+}
+
+- (BOOL)isValidCallbackId:(NSString*)callbackId
+{
+    if ((callbackId == nil) || (_callbackIdPattern == nil)) {
+        return NO;
+    }
+
+    // Disallow if too long or if any invalid characters were found.
+    if (([callbackId length] > 100) || [_callbackIdPattern firstMatchInString:callbackId options:0 range:NSMakeRange(0, [callbackId length])]) {
+        return NO;
+    }
+    return YES;
+}
+
+- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId
+{
+    CDV_EXEC_LOG(@"Exec(%@): Sending result. Status=%@", callbackId, result.status);
+    // This occurs when there is are no win/fail callbacks for the call.
+    if ([@"INVALID" isEqualToString:callbackId]) {
+        return;
+    }
+    // This occurs when the callback id is malformed.
+    if (![self isValidCallbackId:callbackId]) {
+        NSLog(@"Invalid callback id received by sendPluginResult");
+        return;
+    }
+    int status = [result.status intValue];
+    BOOL keepCallback = [result.keepCallback boolValue];
+    NSString* argumentsAsJSON = [result argumentsAsJSON];
+
+    NSString* js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeCallback('%@',%d,%@,%d)", callbackId, status, argumentsAsJSON, keepCallback];
+
+    [self evalJsHelper:js];
+}
+
+- (void)evalJs:(NSString*)js
+{
+    [self evalJs:js scheduledOnRunLoop:YES];
+}
+
+- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop
+{
+    js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeEvalAndFetch(function(){%@})", js];
+    if (scheduledOnRunLoop) {
+        [self evalJsHelper:js];
+    } else {
+        [self evalJsHelper2:js];
+    }
+}
+
+- (id)getCommandInstance:(NSString*)pluginName
+{
+    return [_viewController getCommandInstance:pluginName];
+}
+
+- (void)runInBackground:(void (^)())block
+{
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block);
+}
+
+- (NSString*)userAgent
+{
+    return [_viewController userAgent];
+}
+
+- (BOOL)URLIsWhitelisted:(NSURL*)url
+{
+    return ![_viewController.whitelist schemeIsAllowed:[url scheme]] ||
+           [_viewController.whitelist URLIsAllowed:url logFailure:NO];
+}
+
+- (NSDictionary*)settings
+{
+    return _viewController.settings;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVCommandQueue.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVCommandQueue.h b/CordovaLib/Classes/Public/CDVCommandQueue.h
new file mode 100644
index 0000000..3329078
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVCommandQueue.h
@@ -0,0 +1,40 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class CDVInvokedUrlCommand;
+@class CDVViewController;
+
+@interface CDVCommandQueue : NSObject
+
+@property (nonatomic, readonly) BOOL currentlyExecuting;
+
+- (id)initWithViewController:(CDVViewController*)viewController;
+- (void)dispose;
+
+- (void)resetRequestId;
+- (void)enqueueCommandBatch:(NSString*)batchJSON;
+
+- (void)processXhrExecBridgePoke:(NSNumber*)requestId;
+- (void)fetchCommandsFromJs;
+- (void)executePending;
+- (BOOL)execute:(CDVInvokedUrlCommand*)command;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVCommandQueue.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVCommandQueue.m b/CordovaLib/Classes/Public/CDVCommandQueue.m
new file mode 100644
index 0000000..d2f71cb
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVCommandQueue.m
@@ -0,0 +1,218 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#include <objc/message.h>
+#import "CDVCommandQueue.h"
+#import "CDVViewController.h"
+#import "CDVCommandDelegateImpl.h"
+#import "CDVJSON_private.h"
+#import "CDVDebug.h"
+
+// Parse JS on the main thread if it's shorter than this.
+static const NSInteger JSON_SIZE_FOR_MAIN_THREAD = 4 * 1024; // Chosen arbitrarily.
+// Execute multiple commands in one go until this many seconds have passed.
+static const double MAX_EXECUTION_TIME = .008; // Half of a 60fps frame.
+
+@interface CDVCommandQueue () {
+    NSInteger _lastCommandQueueFlushRequestId;
+    __weak CDVViewController* _viewController;
+    NSMutableArray* _queue;
+    NSTimeInterval _startExecutionTime;
+}
+@end
+
+@implementation CDVCommandQueue
+
+- (BOOL)currentlyExecuting
+{
+    return _startExecutionTime > 0;
+}
+
+- (id)initWithViewController:(CDVViewController*)viewController
+{
+    self = [super init];
+    if (self != nil) {
+        _viewController = viewController;
+        _queue = [[NSMutableArray alloc] init];
+    }
+    return self;
+}
+
+- (void)dispose
+{
+    // TODO(agrieve): Make this a zeroing weak ref once we drop support for 4.3.
+    _viewController = nil;
+}
+
+- (void)resetRequestId
+{
+    _lastCommandQueueFlushRequestId = 0;
+}
+
+- (void)enqueueCommandBatch:(NSString*)batchJSON
+{
+    if ([batchJSON length] > 0) {
+        NSMutableArray* commandBatchHolder = [[NSMutableArray alloc] init];
+        [_queue addObject:commandBatchHolder];
+        if ([batchJSON length] < JSON_SIZE_FOR_MAIN_THREAD) {
+            [commandBatchHolder addObject:[batchJSON cdv_JSONObject]];
+        } else {
+            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^() {
+                NSMutableArray* result = [batchJSON cdv_JSONObject];
+                @synchronized(commandBatchHolder) {
+                    [commandBatchHolder addObject:result];
+                }
+                [self performSelectorOnMainThread:@selector(executePending) withObject:nil waitUntilDone:NO];
+            });
+        }
+    }
+}
+
+- (void)processXhrExecBridgePoke:(NSNumber*)requestId
+{
+    NSInteger rid = [requestId integerValue];
+
+    // An ID of 1 is a special case because that signifies the first request of
+    // the page. Since resetRequestId is called from webViewDidStartLoad, and the
+    // JS context at the time of webViewDidStartLoad is still that of the previous
+    // page, it's possible for requests from the previous page to come in after this
+    // point. We ignore these by enforcing that ID=1 be the first ID.
+    if ((_lastCommandQueueFlushRequestId == 0) && (rid != 1)) {
+        CDV_EXEC_LOG(@"Exec: Ignoring exec request from previous page.");
+        return;
+    }
+
+    // Use the request ID to determine if we've already flushed for this request.
+    // This is required only because the NSURLProtocol enqueues the same request
+    // multiple times.
+    if (rid > _lastCommandQueueFlushRequestId) {
+        _lastCommandQueueFlushRequestId = [requestId integerValue];
+        [self fetchCommandsFromJs];
+        [self executePending];
+    }
+}
+
+- (void)fetchCommandsFromJs
+{
+    __weak CDVCommandQueue* weakSelf = self;
+    NSString* js = @"cordova.require('cordova/exec').nativeFetchMessages()";
+
+    [_viewController.webViewEngine evaluateJavaScript:js
+                                    completionHandler:^(id obj, NSError* error) {
+        if ((error == nil) && [obj isKindOfClass:[NSString class]]) {
+            NSString* queuedCommandsJSON = (NSString*)obj;
+            CDV_EXEC_LOG(@"Exec: Flushed JS->native queue (hadCommands=%d).", [queuedCommandsJSON length] > 0);
+            [weakSelf enqueueCommandBatch:queuedCommandsJSON];
+            // this has to be called here now, because fetchCommandsFromJs is now async (previously: synchronous)
+            [self executePending];
+        }
+    }];
+}
+
+- (void)executePending
+{
+    // Make us re-entrant-safe.
+    if (_startExecutionTime > 0) {
+        return;
+    }
+    @try {
+        _startExecutionTime = [NSDate timeIntervalSinceReferenceDate];
+
+        while ([_queue count] > 0) {
+            NSMutableArray* commandBatchHolder = _queue[0];
+            NSMutableArray* commandBatch = nil;
+            @synchronized(commandBatchHolder) {
+                // If the next-up command is still being decoded, wait for it.
+                if ([commandBatchHolder count] == 0) {
+                    break;
+                }
+                commandBatch = commandBatchHolder[0];
+            }
+
+            while ([commandBatch count] > 0) {
+                @autoreleasepool {
+                    // Execute the commands one-at-a-time.
+                    NSArray* jsonEntry = [commandBatch cdv_dequeue];
+                    if ([commandBatch count] == 0) {
+                        [_queue removeObjectAtIndex:0];
+                    }
+                    CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonEntry];
+                    CDV_EXEC_LOG(@"Exec(%@): Calling %@.%@", command.callbackId, command.className, command.methodName);
+
+                    if (![self execute:command]) {
+#ifdef DEBUG
+                            NSString* commandJson = [jsonEntry cdv_JSONString];
+                            static NSUInteger maxLogLength = 1024;
+                            NSString* commandString = ([commandJson length] > maxLogLength) ?
+                                [NSString stringWithFormat : @"%@[...]", [commandJson substringToIndex:maxLogLength]] :
+                                commandJson;
+
+                            DLog(@"FAILED pluginJSON = %@", commandString);
+#endif
+                    }
+                }
+
+                // Yield if we're taking too long.
+                if (([_queue count] > 0) && ([NSDate timeIntervalSinceReferenceDate] - _startExecutionTime > MAX_EXECUTION_TIME)) {
+                    [self performSelector:@selector(executePending) withObject:nil afterDelay:0];
+                    return;
+                }
+            }
+        }
+    } @finally
+    {
+        _startExecutionTime = 0;
+    }
+}
+
+- (BOOL)execute:(CDVInvokedUrlCommand*)command
+{
+    if ((command.className == nil) || (command.methodName == nil)) {
+        NSLog(@"ERROR: Classname and/or methodName not found for command.");
+        return NO;
+    }
+
+    // Fetch an instance of this class
+    CDVPlugin* obj = [_viewController.commandDelegate getCommandInstance:command.className];
+
+    if (!([obj isKindOfClass:[CDVPlugin class]])) {
+        NSLog(@"ERROR: Plugin '%@' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.", command.className);
+        return NO;
+    }
+    BOOL retVal = YES;
+    double started = [[NSDate date] timeIntervalSince1970] * 1000.0;
+    // Find the proper selector to call.
+    NSString* methodName = [NSString stringWithFormat:@"%@:", command.methodName];
+    SEL normalSelector = NSSelectorFromString(methodName);
+    if ([obj respondsToSelector:normalSelector]) {
+        // [obj performSelector:normalSelector withObject:command];
+        ((void (*)(id, SEL, id))objc_msgSend)(obj, normalSelector, command);
+    } else {
+        // There's no method to call, so throw an error.
+        NSLog(@"ERROR: Method '%@' not defined in Plugin '%@'", methodName, command.className);
+        retVal = NO;
+    }
+    double elapsed = [[NSDate date] timeIntervalSince1970] * 1000.0 - started;
+    if (elapsed > 10) {
+        NSLog(@"THREAD WARNING: ['%@'] took '%f' ms. Plugin should use a background thread.", command.className, elapsed);
+    }
+    return retVal;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVConfigParser.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVConfigParser.h b/CordovaLib/Classes/Public/CDVConfigParser.h
new file mode 100644
index 0000000..2e06c88
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVConfigParser.h
@@ -0,0 +1,31 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+@interface CDVConfigParser : NSObject <NSXMLParserDelegate>
+{
+    NSString* featureName;
+}
+
+@property (nonatomic, readonly, strong) NSMutableDictionary* pluginsDict;
+@property (nonatomic, readonly, strong) NSMutableDictionary* settings;
+@property (nonatomic, readonly, strong) NSMutableArray* whitelistHosts;
+@property (nonatomic, readonly, strong) NSMutableArray* startupPluginNames;
+@property (nonatomic, readonly, strong) NSString* startPage;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVConfigParser.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVConfigParser.m b/CordovaLib/Classes/Public/CDVConfigParser.m
new file mode 100644
index 0000000..4b73b60
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVConfigParser.m
@@ -0,0 +1,88 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVConfigParser.h"
+
+@interface CDVConfigParser ()
+
+@property (nonatomic, readwrite, strong) NSMutableDictionary* pluginsDict;
+@property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
+@property (nonatomic, readwrite, strong) NSMutableArray* whitelistHosts;
+@property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
+@property (nonatomic, readwrite, strong) NSString* startPage;
+
+@end
+
+@implementation CDVConfigParser
+
+@synthesize pluginsDict, settings, whitelistHosts, startPage, startupPluginNames;
+
+- (id)init
+{
+    self = [super init];
+    if (self != nil) {
+        self.pluginsDict = [[NSMutableDictionary alloc] initWithCapacity:30];
+        self.settings = [[NSMutableDictionary alloc] initWithCapacity:30];
+        self.whitelistHosts = [[NSMutableArray alloc] initWithCapacity:30];
+        [self.whitelistHosts addObject:@"file:///*"];
+        [self.whitelistHosts addObject:@"content:///*"];
+        [self.whitelistHosts addObject:@"data:///*"];
+        self.startupPluginNames = [[NSMutableArray alloc] initWithCapacity:8];
+        featureName = nil;
+    }
+    return self;
+}
+
+- (void)parser:(NSXMLParser*)parser didStartElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName attributes:(NSDictionary*)attributeDict
+{
+    if ([elementName isEqualToString:@"preference"]) {
+        settings[[attributeDict[@"name"] lowercaseString]] = attributeDict[@"value"];
+    } else if ([elementName isEqualToString:@"feature"]) { // store feature name to use with correct parameter set
+        featureName = [attributeDict[@"name"] lowercaseString];
+    } else if ((featureName != nil) && [elementName isEqualToString:@"param"]) {
+        NSString* paramName = [attributeDict[@"name"] lowercaseString];
+        id value = attributeDict[@"value"];
+        if ([paramName isEqualToString:@"ios-package"]) {
+            pluginsDict[featureName] = value;
+        }
+        BOOL paramIsOnload = ([paramName isEqualToString:@"onload"] && [@"true" isEqualToString : value]);
+        BOOL attribIsOnload = [@"true" isEqualToString :[attributeDict[@"onload"] lowercaseString]];
+        if (paramIsOnload || attribIsOnload) {
+            [self.startupPluginNames addObject:featureName];
+        }
+    } else if ([elementName isEqualToString:@"access"]) {
+        [whitelistHosts addObject:attributeDict[@"origin"]];
+    } else if ([elementName isEqualToString:@"content"]) {
+        self.startPage = attributeDict[@"src"];
+    }
+}
+
+- (void)parser:(NSXMLParser*)parser didEndElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName
+{
+    if ([elementName isEqualToString:@"feature"]) { // no longer handling a feature so release
+        featureName = nil;
+    }
+}
+
+- (void)parser:(NSXMLParser*)parser parseErrorOccurred:(NSError*)parseError
+{
+    NSAssert(NO, @"config.xml parse error line %ld col %ld", (long)[parser lineNumber], (long)[parser columnNumber]);
+}
+
+@end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[41/50] [abbrv] ios commit: CB-8710 - cordova-ios jasmine tests do not clean up build products, tests can only be run once

Posted by ia...@apache.org.
CB-8710 - cordova-ios jasmine tests do not clean up build products, tests can only be run once


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/acb703ae
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/acb703ae
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/acb703ae

Branch: refs/heads/unplug-whitelist
Commit: acb703aebf772b269efc2519d18a00b7a2653461
Parents: 4f1ccbe
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Mar 18 17:20:46 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Mar 18 17:20:46 2015 -0700

----------------------------------------------------------------------
 tests/spec/cordovalib.spec.js | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/acb703ae/tests/spec/cordovalib.spec.js
----------------------------------------------------------------------
diff --git a/tests/spec/cordovalib.spec.js b/tests/spec/cordovalib.spec.js
index 10cd696..9657717 100644
--- a/tests/spec/cordovalib.spec.js
+++ b/tests/spec/cordovalib.spec.js
@@ -48,4 +48,9 @@ describe('cordova-lib', function() {
         return_code = shell.exec(command).code;
         expect(return_code).toBe(0);
     });
+    
+    // clean-up last
+    it('cleanup artifacts folder', function() {
+        shell.rm('-rf', artifacts_dir);
+    });
 });
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[44/50] [abbrv] ios commit: Add hooks for whitelist plugins

Posted by ia...@apache.org.
Add hooks for whitelist plugins

This allows plugins to implement two methods:
- (BOOL)shouldAllowRequestForURL:(NSURL *)url
- (BOOL)shouldAllowNavigationToURL:(NSURL *)url
- (BOOL)shouldOpenExternalURL:(NSURL *)url


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/c52e7ecf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/c52e7ecf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/c52e7ecf

Branch: refs/heads/unplug-whitelist
Commit: c52e7ecf687c7fb310f696fdb81ec56122f732c8
Parents: 9ad1c7c
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Oct 24 16:09:07 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Mar 19 11:06:29 2015 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDVViewController.h |  3 +
 CordovaLib/Classes/Public/CDVViewController.m | 72 ++++++++++++++++++++++
 2 files changed, 75 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c52e7ecf/CordovaLib/Classes/Public/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.h b/CordovaLib/Classes/Public/CDVViewController.h
index 534c649..693b1e8 100644
--- a/CordovaLib/Classes/Public/CDVViewController.h
+++ b/CordovaLib/Classes/Public/CDVViewController.h
@@ -83,6 +83,9 @@
 - (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName;
 
 - (BOOL)URLisAllowed:(NSURL*)url;
+- (BOOL)shouldAllowRequestForURL:(NSURL *)url;
+- (BOOL)shouldAllowNavigationToURL:(NSURL *)url;
+- (BOOL)shouldOpenExternalURL:(NSURL *)url;
 
 - (void)parseSettingsWithParser:(NSObject<NSXMLParserDelegate> *)delegate;
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c52e7ecf/CordovaLib/Classes/Public/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index a6b7fae..aeade66 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -684,6 +684,78 @@
     return YES;
 }
 
+#pragma mark Network Policy Plugin (Whitelist) hooks
+
+- (BOOL)shouldAllowRequestForURL:(NSURL *)url
+{
+    BOOL anyPluginsResponded = NO;
+    BOOL shouldAllowRequest = NO;
+    for (NSString* pluginName in pluginObjects) {
+        CDVPlugin* plugin = [pluginObjects objectForKey:pluginName];
+        SEL selector = NSSelectorFromString(@"shouldAllowRequestForURL:");
+        if ([plugin respondsToSelector:selector]) {
+            anyPluginsResponded = YES;
+            shouldAllowRequest = ((BOOL (*)(id, SEL, id))objc_msgSend)(plugin, selector, url);
+            if (shouldAllowRequest == NO) {
+                break;
+            }
+        }
+    }
+    if (anyPluginsResponded) {
+        return shouldAllowRequest;
+    }
+
+    /* Default Policy */
+    return NO;
+}
+
+
+- (BOOL)shouldAllowNavigationToURL:(NSURL *)url
+{
+    BOOL anyPluginsResponded = NO;
+    BOOL shouldAllowNavigation = NO;
+    for (NSString* pluginName in pluginObjects) {
+        CDVPlugin* plugin = [pluginObjects objectForKey:pluginName];
+        SEL selector = NSSelectorFromString(@"shouldAllowNavigationToURL:");
+        if ([plugin respondsToSelector:selector]) {
+            anyPluginsResponded = YES;
+            shouldAllowNavigation = ((BOOL (*)(id, SEL, id))objc_msgSend)(plugin, selector, url);
+            if (shouldAllowNavigation == NO) {
+                break;
+            }
+        }
+    }
+    if (anyPluginsResponded) {
+        return shouldAllowNavigation;
+    }
+
+    /* Default Policy */
+    return NO;
+}
+
+- (BOOL)shouldOpenExternalURL:(NSURL *)url
+{
+    BOOL anyPluginsResponded = NO;
+    BOOL shouldOpenExternalURL = NO;
+    for (NSString* pluginName in pluginObjects) {
+        CDVPlugin* plugin = [pluginObjects objectForKey:pluginName];
+        SEL selector = NSSelectorFromString(@"shouldOpenExternalURL:");
+        if ([plugin respondsToSelector:selector]) {
+            anyPluginsResponded = YES;
+            shouldOpenExternalURL = ((BOOL (*)(id, SEL, id))objc_msgSend)(plugin, selector, url);
+            if (shouldOpenExternalURL == NO) {
+                break;
+            }
+        }
+    }
+    if (anyPluginsResponded) {
+        return shouldOpenExternalURL;
+    }
+
+    /* Default policy */
+    return NO;
+}
+
 #pragma mark GapHelpers
 
 - (void)javascriptAlert:(NSString*)text


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[48/50] [abbrv] ios commit: Replace explicit boolean comparisons with implicit ones

Posted by ia...@apache.org.
Replace explicit boolean comparisons with implicit ones

(Avoids the "== YES" failing on (BOOL)2 problem)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/d4829c1b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/d4829c1b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/d4829c1b

Branch: refs/heads/unplug-whitelist
Commit: d4829c1baef9046db63123e437468a01a50c5832
Parents: 656ae1c
Author: Ian Clelland <ic...@chromium.org>
Authored: Thu Oct 30 14:13:17 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Mar 19 11:06:30 2015 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDVViewController.m | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d4829c1b/CordovaLib/Classes/Public/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index 305c63e..d75df96 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -616,7 +616,7 @@
         CDVPlugin* plugin = [pluginObjects objectForKey:pluginName];
         SEL selector = NSSelectorFromString(@"shouldOverrideLoadWithRequest:navigationType:");
         if ([plugin respondsToSelector:selector]) {
-            if (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, request, navigationType) == YES) {
+            if (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, request, navigationType)) {
                 return NO;
             }
         }
@@ -625,7 +625,7 @@
     /*
      *    If we loaded the HTML from a string, we let the app handle it
      */
-    if (self.loadFromString == YES) {
+    if (self.loadFromString) {
         self.loadFromString = NO;
         return YES;
     }
@@ -691,7 +691,7 @@
         if ([plugin respondsToSelector:selector]) {
             anyPluginsResponded = YES;
             shouldAllowRequest = ((BOOL (*)(id, SEL, id))objc_msgSend)(plugin, selector, url);
-            if (shouldAllowRequest == NO) {
+            if (!shouldAllowRequest) {
                 break;
             }
         }
@@ -715,7 +715,7 @@
         if ([plugin respondsToSelector:selector]) {
             anyPluginsResponded = YES;
             shouldAllowNavigation = ((BOOL (*)(id, SEL, id))objc_msgSend)(plugin, selector, url);
-            if (shouldAllowNavigation == NO) {
+            if (!shouldAllowNavigation) {
                 break;
             }
         }
@@ -738,7 +738,7 @@
         if ([plugin respondsToSelector:selector]) {
             anyPluginsResponded = YES;
             shouldOpenExternalURL = ((BOOL (*)(id, SEL, id))objc_msgSend)(plugin, selector, url);
-            if (shouldOpenExternalURL == NO) {
+            if (!shouldOpenExternalURL) {
                 break;
             }
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[37/50] [abbrv] ios commit: CB-8709 - Remove usage of obsolete CDVLocalStorage fix in CDVViewController.m (plus style fix-ups)

Posted by ia...@apache.org.
CB-8709 - Remove usage of obsolete CDVLocalStorage fix in CDVViewController.m (plus style fix-ups)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/5920ef2b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/5920ef2b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/5920ef2b

Branch: refs/heads/unplug-whitelist
Commit: 5920ef2b2a007b3acf483c882cf5e6818738284c
Parents: 987c515
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Mar 18 15:11:52 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Mar 18 15:11:52 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDV.h               | 1 -
 CordovaLib/Classes/Public/CDVViewController.m | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5920ef2b/CordovaLib/Classes/Public/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDV.h b/CordovaLib/Classes/Public/CDV.h
index fbeaea2..732494c 100644
--- a/CordovaLib/Classes/Public/CDV.h
+++ b/CordovaLib/Classes/Public/CDV.h
@@ -27,7 +27,6 @@
 #import "CDVURLProtocol.h"
 #import "CDVInvokedUrlCommand.h"
 #import "CDVWhitelist.h"
-#import "CDVLocalStorage.h"
 #import "CDVPlugin.h"
 #import "CDVPluginResult.h"
 #import "CDVScreenOrientationDelegate.h"

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5920ef2b/CordovaLib/Classes/Public/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index 6b40a84..bf7e532 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -279,8 +279,6 @@
     }
     [self.settings setCordovaSetting:backupWebStorageType forKey:@"BackupWebStorage"];
 
-    [CDVLocalStorage __fixupDatabaseLocationsWithBackupType:backupWebStorageType];
-
     // // Instantiate the WebView ///////////////
 
     if (!self.webView) {
@@ -694,7 +692,7 @@
 + (NSString*)applicationDocumentsDirectory
 {
     NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
-    NSString* basePath = (([paths count] > 0) ? ([paths objectAtIndex:0]) : nil);
+    NSString* basePath = (([paths count] > 0) ? ([paths objectAtIndex : 0]) : nil);
 
     return basePath;
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[29/50] [abbrv] ios commit: CB-8690 - Group files into folders in CordovaLib/Classes

Posted by ia...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
new file mode 100644
index 0000000..6b40a84
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -0,0 +1,878 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <objc/message.h>
+#import "CDV.h"
+#import "CDVPlugin+Private.h"
+#import "CDVUIWebViewDelegate.h"
+#import "CDVConfigParser.h"
+#import "CDVUserAgentUtil.h"
+#import <AVFoundation/AVFoundation.h>
+#import "NSDictionary+CordovaPreferences.h"
+#import "CDVHandleOpenURL.h"
+#import "CDVCommandDelegateImpl.h"
+
+#define degreesToRadian(x) (M_PI * (x) / 180.0)
+
+@interface CDVViewController () {
+    NSInteger _userAgentLockToken;
+}
+
+@property (nonatomic, readwrite, strong) NSXMLParser* configParser;
+@property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
+@property (nonatomic, readwrite, strong) CDVWhitelist* whitelist;
+@property (nonatomic, readwrite, strong) NSMutableDictionary* pluginObjects;
+@property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
+@property (nonatomic, readwrite, strong) NSDictionary* pluginsMap;
+@property (nonatomic, readwrite, strong) NSArray* supportedOrientations;
+@property (nonatomic, readwrite, assign) BOOL loadFromString;
+@property (nonatomic, readwrite, strong) id <CDVWebViewEngineProtocol> webViewEngine;
+
+@property (readwrite, assign) BOOL initialized;
+
+@property (atomic, strong) NSURL* openURL;
+
+@end
+
+@implementation CDVViewController
+
+@synthesize supportedOrientations;
+@synthesize pluginObjects, pluginsMap, whitelist, startupPluginNames;
+@synthesize configParser, settings, loadFromString;
+@synthesize wwwFolderName, startPage, initialized, openURL, baseUserAgent;
+@synthesize commandDelegate = _commandDelegate;
+@synthesize commandQueue = _commandQueue;
+@synthesize webViewEngine = _webViewEngine;
+@dynamic webView;
+
+- (void)__init
+{
+    if ((self != nil) && !self.initialized) {
+        _commandQueue = [[CDVCommandQueue alloc] initWithViewController:self];
+        _commandDelegate = [[CDVCommandDelegateImpl alloc] initWithViewController:self];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillTerminate:)
+                                                     name:UIApplicationWillTerminateNotification object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillResignActive:)
+                                                     name:UIApplicationWillResignActiveNotification object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidBecomeActive:)
+                                                     name:UIApplicationDidBecomeActiveNotification object:nil];
+
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillEnterForeground:)
+                                                     name:UIApplicationWillEnterForegroundNotification object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidEnterBackground:)
+                                                     name:UIApplicationDidEnterBackgroundNotification object:nil];
+
+        // read from UISupportedInterfaceOrientations (or UISupportedInterfaceOrientations~iPad, if its iPad) from -Info.plist
+        self.supportedOrientations = [self parseInterfaceOrientations:
+            [[[NSBundle mainBundle] infoDictionary] objectForKey:@"UISupportedInterfaceOrientations"]];
+
+        [self printVersion];
+        [self printMultitaskingInfo];
+        [self printPlatformVersionWarning];
+        self.initialized = YES;
+
+        // load config.xml settings
+        [self loadSettings];
+    }
+}
+
+- (id)initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil
+{
+    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+    [self __init];
+    return self;
+}
+
+- (id)initWithCoder:(NSCoder*)aDecoder
+{
+    self = [super initWithCoder:aDecoder];
+    [self __init];
+    return self;
+}
+
+- (id)init
+{
+    self = [super init];
+    [self __init];
+    return self;
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+    [super viewWillAppear:animated];
+}
+
+- (void)viewWillDisappear:(BOOL)animated
+{
+    [super viewWillDisappear:animated];
+}
+
+- (void)printVersion
+{
+    NSLog(@"Apache Cordova native platform version %@ is starting.", CDV_VERSION);
+}
+
+- (void)printPlatformVersionWarning
+{
+    if (!IsAtLeastiOSVersion(@"7.0")) {
+        NSLog(@"CRITICAL: For Cordova 4.0.0 and above, you will need to upgrade to at least iOS 7.0 or greater. Your current version of iOS is %@.",
+            [[UIDevice currentDevice] systemVersion]
+            );
+    }
+}
+
+- (void)printMultitaskingInfo
+{
+    UIDevice* device = [UIDevice currentDevice];
+    BOOL backgroundSupported = NO;
+
+    if ([device respondsToSelector:@selector(isMultitaskingSupported)]) {
+        backgroundSupported = device.multitaskingSupported;
+    }
+
+    NSNumber* exitsOnSuspend = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIApplicationExitsOnSuspend"];
+    if (exitsOnSuspend == nil) { // if it's missing, it should be NO (i.e. multi-tasking on by default)
+        exitsOnSuspend = [NSNumber numberWithBool:NO];
+    }
+
+    NSLog(@"Multi-tasking -> Device: %@, App: %@", (backgroundSupported ? @"YES" : @"NO"), (![exitsOnSuspend intValue]) ? @"YES" : @"NO");
+}
+
+- (BOOL)URLisAllowed:(NSURL*)url
+{
+    if (self.whitelist == nil) {
+        return YES;
+    }
+
+    return [self.whitelist URLIsAllowed:url];
+}
+
+- (void)loadSettings
+{
+    CDVConfigParser* delegate = [[CDVConfigParser alloc] init];
+
+    // read from config.xml in the app bundle
+    NSString* path = [[NSBundle mainBundle] pathForResource:@"config" ofType:@"xml"];
+
+    if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
+        NSAssert(NO, @"ERROR: config.xml does not exist. Please run cordova-ios/bin/cordova_plist_to_config_xml path/to/project.");
+        return;
+    }
+
+    NSURL* url = [NSURL fileURLWithPath:path];
+
+    self.configParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
+    if (self.configParser == nil) {
+        NSLog(@"Failed to initialize XML parser.");
+        return;
+    }
+    [self.configParser setDelegate:((id < NSXMLParserDelegate >)delegate)];
+    [self.configParser parse];
+
+    // Get the plugin dictionary, whitelist and settings from the delegate.
+    self.pluginsMap = delegate.pluginsDict;
+    self.startupPluginNames = delegate.startupPluginNames;
+    self.whitelist = [[CDVWhitelist alloc] initWithArray:delegate.whitelistHosts];
+    self.settings = delegate.settings;
+
+    // And the start folder/page.
+    self.wwwFolderName = @"www";
+    self.startPage = delegate.startPage;
+    if (self.startPage == nil) {
+        self.startPage = @"index.html";
+    }
+
+    // Initialize the plugin objects dict.
+    self.pluginObjects = [[NSMutableDictionary alloc] initWithCapacity:20];
+}
+
+- (NSURL*)appUrl
+{
+    NSURL* appURL = nil;
+
+    if ([self.startPage rangeOfString:@"://"].location != NSNotFound) {
+        appURL = [NSURL URLWithString:self.startPage];
+    } else if ([self.wwwFolderName rangeOfString:@"://"].location != NSNotFound) {
+        appURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", self.wwwFolderName, self.startPage]];
+    } else {
+        // CB-3005 strip parameters from start page to check if page exists in resources
+        NSURL* startURL = [NSURL URLWithString:self.startPage];
+        NSString* startFilePath = [self.commandDelegate pathForResource:[startURL path]];
+
+        if (startFilePath == nil) {
+            self.loadFromString = YES;
+            appURL = nil;
+        } else {
+            appURL = [NSURL fileURLWithPath:startFilePath];
+            // CB-3005 Add on the query params or fragment.
+            NSString* startPageNoParentDirs = self.startPage;
+            NSRange r = [startPageNoParentDirs rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"?#"] options:0];
+            if (r.location != NSNotFound) {
+                NSString* queryAndOrFragment = [self.startPage substringFromIndex:r.location];
+                appURL = [NSURL URLWithString:queryAndOrFragment relativeToURL:appURL];
+            }
+        }
+    }
+
+    return appURL;
+}
+
+- (NSURL*)errorUrl
+{
+    NSURL* errorURL = nil;
+
+    id setting = [self.settings cordovaSettingForKey:@"ErrorUrl"];
+
+    if (setting) {
+        NSString* errorUrlString = (NSString*)setting;
+        if ([errorUrlString rangeOfString:@"://"].location != NSNotFound) {
+            errorURL = [NSURL URLWithString:errorUrlString];
+        } else {
+            NSURL* url = [NSURL URLWithString:(NSString*)setting];
+            NSString* errorFilePath = [self.commandDelegate pathForResource:[url path]];
+            if (errorFilePath) {
+                errorURL = [NSURL fileURLWithPath:errorFilePath];
+            }
+        }
+    }
+
+    return errorURL;
+}
+
+- (UIView*)webView
+{
+    if (self.webViewEngine != nil) {
+        return self.webViewEngine.engineWebView;
+    }
+
+    return nil;
+}
+
+// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
+- (void)viewDidLoad
+{
+    [super viewDidLoad];
+
+    // // Fix the iOS 5.1 SECURITY_ERR bug (CB-347), this must be before the webView is instantiated ////
+
+    NSString* backupWebStorageType = @"cloud"; // default value
+
+    id backupWebStorage = [self.settings cordovaSettingForKey:@"BackupWebStorage"];
+    if ([backupWebStorage isKindOfClass:[NSString class]]) {
+        backupWebStorageType = backupWebStorage;
+    }
+    [self.settings setCordovaSetting:backupWebStorageType forKey:@"BackupWebStorage"];
+
+    [CDVLocalStorage __fixupDatabaseLocationsWithBackupType:backupWebStorageType];
+
+    // // Instantiate the WebView ///////////////
+
+    if (!self.webView) {
+        [self createGapView];
+    }
+
+    // register this viewcontroller with the NSURLProtocol, only after the User-Agent is set
+    [CDVURLProtocol registerViewController:self];
+
+    // /////////////////
+
+    /*
+     * Fire up CDVLocalStorage to work-around WebKit storage limitations: on all iOS 5.1+ versions for local-only backups, but only needed on iOS 5.1 for cloud backup.
+        With minimum iOS 6/7 supported, only first clause applies.
+     */
+    if ([backupWebStorageType isEqualToString:@"local"]) {
+        NSString* localStorageFeatureName = @"localstorage";
+        if ([self.pluginsMap objectForKey:localStorageFeatureName]) { // plugin specified in config
+            [self.startupPluginNames addObject:localStorageFeatureName];
+        }
+    }
+
+    if ([self.startupPluginNames count] > 0) {
+        [CDVTimer start:@"TotalPluginStartup"];
+
+        for (NSString* pluginName in self.startupPluginNames) {
+            [CDVTimer start:pluginName];
+            [self getCommandInstance:pluginName];
+            [CDVTimer stop:pluginName];
+        }
+
+        [CDVTimer stop:@"TotalPluginStartup"];
+    }
+
+    // /////////////////
+    NSURL* appURL = [self appUrl];
+
+    [CDVUserAgentUtil acquireLock:^(NSInteger lockToken) {
+        _userAgentLockToken = lockToken;
+        [CDVUserAgentUtil setUserAgent:self.userAgent lockToken:lockToken];
+        if (appURL) {
+            NSURLRequest* appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
+            [self.webViewEngine loadRequest:appReq];
+        } else {
+            NSString* loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.wwwFolderName, self.startPage];
+            NSLog(@"%@", loadErr);
+
+            NSURL* errorUrl = [self errorUrl];
+            if (errorUrl) {
+                errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [loadErr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] relativeToURL:errorUrl];
+                NSLog(@"%@", [errorUrl absoluteString]);
+                [self.webViewEngine loadRequest:[NSURLRequest requestWithURL:errorUrl]];
+            } else {
+                NSString* html = [NSString stringWithFormat:@"<html><body> %@ </body></html>", loadErr];
+                [self.webViewEngine loadHTMLString:html baseURL:nil];
+            }
+        }
+    }];
+}
+
+- (NSArray*)parseInterfaceOrientations:(NSArray*)orientations
+{
+    NSMutableArray* result = [[NSMutableArray alloc] init];
+
+    if (orientations != nil) {
+        NSEnumerator* enumerator = [orientations objectEnumerator];
+        NSString* orientationString;
+
+        while (orientationString = [enumerator nextObject]) {
+            if ([orientationString isEqualToString:@"UIInterfaceOrientationPortrait"]) {
+                [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortrait]];
+            } else if ([orientationString isEqualToString:@"UIInterfaceOrientationPortraitUpsideDown"]) {
+                [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortraitUpsideDown]];
+            } else if ([orientationString isEqualToString:@"UIInterfaceOrientationLandscapeLeft"]) {
+                [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft]];
+            } else if ([orientationString isEqualToString:@"UIInterfaceOrientationLandscapeRight"]) {
+                [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight]];
+            }
+        }
+    }
+
+    // default
+    if ([result count] == 0) {
+        [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortrait]];
+    }
+
+    return result;
+}
+
+- (NSInteger)mapIosOrientationToJsOrientation:(UIInterfaceOrientation)orientation
+{
+    switch (orientation) {
+        case UIInterfaceOrientationPortraitUpsideDown:
+            return 180;
+
+        case UIInterfaceOrientationLandscapeLeft:
+            return -90;
+
+        case UIInterfaceOrientationLandscapeRight:
+            return 90;
+
+        case UIInterfaceOrientationPortrait:
+            return 0;
+
+        default:
+            return 0;
+    }
+}
+
+- (void)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation completionHandler:(void (^)(BOOL))completionHandler
+{
+    // First, ask the webview via JS if it supports the new orientation
+    NSString* jsCall = [NSString stringWithFormat:
+        @"window.shouldRotateToOrientation && window.shouldRotateToOrientation(%ld);"
+        , (long)[self mapIosOrientationToJsOrientation:interfaceOrientation]];
+    __weak CDVViewController* weakSelf = self;
+
+    [_webViewEngine evaluateJavaScript:jsCall completionHandler:^(NSString* obj, NSError* error) {
+        if ([obj length] > 0) {
+            completionHandler([obj boolValue]);
+        } else {
+            // if js did not handle the new orientation (no return value), use values from the plist (via supportedOrientations)
+            completionHandler([weakSelf supportsOrientation:interfaceOrientation]);
+        }
+    }];
+}
+
+- (BOOL)shouldAutorotate
+{
+    return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations
+{
+    NSUInteger ret = 0;
+
+    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationPortrait]) {
+        ret = ret | (1 << UIInterfaceOrientationPortrait);
+    }
+    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown]) {
+        ret = ret | (1 << UIInterfaceOrientationPortraitUpsideDown);
+    }
+    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight]) {
+        ret = ret | (1 << UIInterfaceOrientationLandscapeRight);
+    }
+    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeLeft]) {
+        ret = ret | (1 << UIInterfaceOrientationLandscapeLeft);
+    }
+
+    return ret;
+}
+
+- (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation
+{
+    return [self.supportedOrientations containsObject:[NSNumber numberWithInt:orientation]];
+}
+
+- (UIView*)newCordovaViewWithFrame:(CGRect)bounds
+{
+    NSString* defaultWebViewEngineClass = @"CDVUIWebViewEngine";
+    NSString* webViewEngineClass = [self.settings cordovaSettingForKey:@"CordovaWebViewEngine"];
+
+    if (!webViewEngineClass) {
+        webViewEngineClass = defaultWebViewEngineClass;
+    }
+
+    // Find webViewEngine
+    if (NSClassFromString(webViewEngineClass)) {
+        self.webViewEngine = [[NSClassFromString(webViewEngineClass) alloc] initWithFrame:bounds];
+        // if a webView engine returns nil (not supported by the current iOS version) or doesn't conform to the protocol, we use UIWebView
+        if (!self.webViewEngine || ![self.webViewEngine conformsToProtocol:@protocol(CDVWebViewEngineProtocol)]) {
+            self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) alloc] initWithFrame:bounds];
+        }
+    } else {
+        self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) alloc] initWithFrame:bounds];
+    }
+
+    if ([self.webViewEngine isKindOfClass:[CDVPlugin class]]) {
+        [self registerPlugin:(CDVPlugin*)self.webViewEngine withClassName:webViewEngineClass];
+    }
+
+    return self.webViewEngine.engineWebView;
+}
+
+- (NSString*)userAgent
+{
+    if (_userAgent == nil) {
+        NSString* localBaseUserAgent;
+        if (self.baseUserAgent != nil) {
+            localBaseUserAgent = self.baseUserAgent;
+        } else {
+            localBaseUserAgent = [CDVUserAgentUtil originalUserAgent];
+        }
+        // Use our address as a unique number to append to the User-Agent.
+        _userAgent = [NSString stringWithFormat:@"%@ (%lld)", localBaseUserAgent, (long long)self];
+    }
+    return _userAgent;
+}
+
+- (void)createGapView
+{
+    CGRect webViewBounds = self.view.bounds;
+
+    webViewBounds.origin = self.view.bounds.origin;
+
+    UIView* view = [self newCordovaViewWithFrame:webViewBounds];
+
+    view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
+    [self.view addSubview:view];
+    [self.view sendSubviewToBack:view];
+}
+
+- (void)didReceiveMemoryWarning
+{
+    // iterate through all the plugin objects, and call hasPendingOperation
+    // if at least one has a pending operation, we don't call [super didReceiveMemoryWarning]
+
+    NSEnumerator* enumerator = [self.pluginObjects objectEnumerator];
+    CDVPlugin* plugin;
+
+    BOOL doPurge = YES;
+
+    while ((plugin = [enumerator nextObject])) {
+        if (plugin.hasPendingOperation) {
+            NSLog(@"Plugin '%@' has a pending operation, memory purge is delayed for didReceiveMemoryWarning.", NSStringFromClass([plugin class]));
+            doPurge = NO;
+        }
+    }
+
+    if (doPurge) {
+        // Releases the view if it doesn't have a superview.
+        [super didReceiveMemoryWarning];
+    }
+
+    // Release any cached data, images, etc. that aren't in use.
+}
+
+- (void)viewDidUnload
+{
+    // Release any retained subviews of the main view.
+    // e.g. self.myOutlet = nil;
+
+    [CDVUserAgentUtil releaseLock:&_userAgentLockToken];
+
+    [super viewDidUnload];
+}
+
+#pragma mark UIWebViewDelegate
+
+/**
+ When web application loads Add stuff to the DOM, mainly the user-defined settings from the Settings.plist file, and
+ the device's data such as device ID, platform version, etc.
+ */
+- (void)webViewDidStartLoad:(UIWebView*)theWebView
+{
+    NSLog(@"Resetting plugins due to page load.");
+    [_commandQueue resetRequestId];
+    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginResetNotification object:self.webView]];
+}
+
+/**
+ Called when the webview finishes loading.  This stops the activity view.
+ */
+- (void)webViewDidFinishLoad:(UIWebView*)theWebView
+{
+    NSLog(@"Finished load of: %@", theWebView.request.URL);
+    // It's safe to release the lock even if this is just a sub-frame that's finished loading.
+    [CDVUserAgentUtil releaseLock:&_userAgentLockToken];
+
+    /*
+     * Hide the Top Activity THROBBER in the Battery Bar
+     */
+    [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
+
+    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:self.webView]];
+}
+
+- (void)webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error
+{
+    [CDVUserAgentUtil releaseLock:&_userAgentLockToken];
+
+    NSString* message = [NSString stringWithFormat:@"Failed to load webpage with error: %@", [error localizedDescription]];
+    NSLog(@"%@", message);
+
+    NSURL* errorUrl = [self errorUrl];
+    if (errorUrl) {
+        errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [message stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] relativeToURL:errorUrl];
+        NSLog(@"%@", [errorUrl absoluteString]);
+        [theWebView loadRequest:[NSURLRequest requestWithURL:errorUrl]];
+    }
+}
+
+- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
+{
+    NSURL* url = [request URL];
+
+    /*
+     * Execute any commands queued with cordova.exec() on the JS side.
+     * The part of the URL after gap:// is irrelevant.
+     */
+    if ([[url scheme] isEqualToString:@"gap"]) {
+        [_commandQueue fetchCommandsFromJs];
+        // The delegate is called asynchronously in this case, so we don't have to use
+        // flushCommandQueueWithDelayedJs (setTimeout(0)) as we do with hash changes.
+        [_commandQueue executePending];
+        return NO;
+    }
+
+    if ([[url fragment] hasPrefix:@"%01"] || [[url fragment] hasPrefix:@"%02"]) {
+        // Delegate is called *immediately* for hash changes. This means that any
+        // calls to stringByEvaluatingJavascriptFromString will occur in the middle
+        // of an existing (paused) call stack. This doesn't cause errors, but may
+        // be unexpected to callers (exec callbacks will be called before exec() even
+        // returns). To avoid this, we do not do any synchronous JS evals by using
+        // flushCommandQueueWithDelayedJs.
+        NSString* inlineCommands = [[url fragment] substringFromIndex:3];
+        if ([inlineCommands length] == 0) {
+            // Reach in right away since the WebCore / Main thread are already synchronized.
+            [_commandQueue fetchCommandsFromJs];
+        } else {
+            inlineCommands = [inlineCommands stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+            [_commandQueue enqueueCommandBatch:inlineCommands];
+        }
+        // Switch these for minor performance improvements, and to really live on the wild side.
+        // Callbacks will occur in the middle of the location.hash = ... statement!
+        [(CDVCommandDelegateImpl*)_commandDelegate flushCommandQueueWithDelayedJs];
+        // [_commandQueue executePending];
+
+        // Although we return NO, the hash change does end up taking effect.
+        return NO;
+    }
+
+    /*
+     * Give plugins the chance to handle the url
+     */
+    for (NSString* pluginName in pluginObjects) {
+        CDVPlugin* plugin = [pluginObjects objectForKey:pluginName];
+        SEL selector = NSSelectorFromString(@"shouldOverrideLoadWithRequest:navigationType:");
+        if ([plugin respondsToSelector:selector]) {
+            if (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, request, navigationType) == YES) {
+                return NO;
+            }
+        }
+    }
+
+    /*
+     * If a URL is being loaded that's a file/http/https URL, just load it internally
+     */
+    if ([url isFileURL]) {
+        return YES;
+    }
+
+    /*
+     *    If we loaded the HTML from a string, we let the app handle it
+     */
+    else if (self.loadFromString == YES) {
+        self.loadFromString = NO;
+        return YES;
+    }
+
+    /*
+     * all tel: scheme urls we let the UIWebview handle it using the default behavior
+     */
+    else if ([[url scheme] isEqualToString:@"tel"]) {
+        return YES;
+    }
+
+    /*
+     * all about: scheme urls are not handled
+     */
+    else if ([[url scheme] isEqualToString:@"about"]) {
+        return NO;
+    }
+
+    /*
+     * all data: scheme urls are handled
+     */
+    else if ([[url scheme] isEqualToString:@"data"]) {
+        return YES;
+    }
+
+    /*
+     * Handle all other types of urls (tel:, sms:), and requests to load a url in the main webview.
+     */
+    else {
+        if ([self.whitelist schemeIsAllowed:[url scheme]]) {
+            return [self.whitelist URLIsAllowed:url];
+        } else {
+            if ([[UIApplication sharedApplication] canOpenURL:url]) {
+                [[UIApplication sharedApplication] openURL:url];
+            } else { // handle any custom schemes to plugins
+                [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
+            }
+        }
+
+        return NO;
+    }
+
+    return YES;
+}
+
+#pragma mark GapHelpers
+
+- (void)javascriptAlert:(NSString*)text
+{
+    NSString* jsString = [NSString stringWithFormat:@"alert('%@');", text];
+
+    [self.commandDelegate evalJs:jsString];
+}
+
++ (NSString*)applicationDocumentsDirectory
+{
+    NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+    NSString* basePath = (([paths count] > 0) ? ([paths objectAtIndex:0]) : nil);
+
+    return basePath;
+}
+
+#pragma mark CordovaCommands
+
+- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className
+{
+    if ([plugin respondsToSelector:@selector(setViewController:)]) {
+        [plugin setViewController:self];
+    }
+
+    if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) {
+        [plugin setCommandDelegate:_commandDelegate];
+    }
+
+    [self.pluginObjects setObject:plugin forKey:className];
+    [plugin pluginInitialize];
+}
+
+- (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName
+{
+    if ([plugin respondsToSelector:@selector(setViewController:)]) {
+        [plugin setViewController:self];
+    }
+
+    if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) {
+        [plugin setCommandDelegate:_commandDelegate];
+    }
+
+    NSString* className = NSStringFromClass([plugin class]);
+    [self.pluginObjects setObject:plugin forKey:className];
+    [self.pluginsMap setValue:className forKey:[pluginName lowercaseString]];
+    [plugin pluginInitialize];
+}
+
+/**
+ Returns an instance of a CordovaCommand object, based on its name.  If one exists already, it is returned.
+ */
+- (id)getCommandInstance:(NSString*)pluginName
+{
+    // first, we try to find the pluginName in the pluginsMap
+    // (acts as a whitelist as well) if it does not exist, we return nil
+    // NOTE: plugin names are matched as lowercase to avoid problems - however, a
+    // possible issue is there can be duplicates possible if you had:
+    // "org.apache.cordova.Foo" and "org.apache.cordova.foo" - only the lower-cased entry will match
+    NSString* className = [self.pluginsMap objectForKey:[pluginName lowercaseString]];
+
+    if (className == nil) {
+        return nil;
+    }
+
+    id obj = [self.pluginObjects objectForKey:className];
+    if (!obj) {
+        obj = [[NSClassFromString(className)alloc] initWithWebViewEngine:_webViewEngine];
+
+        if (obj != nil) {
+            [self registerPlugin:obj withClassName:className];
+        } else {
+            NSLog(@"CDVPlugin class %@ (pluginName: %@) does not exist.", className, pluginName);
+        }
+    }
+    return obj;
+}
+
+#pragma mark -
+
+- (NSString*)appURLScheme
+{
+    NSString* URLScheme = nil;
+
+    NSArray* URLTypes = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleURLTypes"];
+
+    if (URLTypes != nil) {
+        NSDictionary* dict = [URLTypes objectAtIndex:0];
+        if (dict != nil) {
+            NSArray* URLSchemes = [dict objectForKey:@"CFBundleURLSchemes"];
+            if (URLSchemes != nil) {
+                URLScheme = [URLSchemes objectAtIndex:0];
+            }
+        }
+    }
+
+    return URLScheme;
+}
+
+/**
+ Returns the contents of the named plist bundle, loaded as a dictionary object
+ */
++ (NSDictionary*)getBundlePlist:(NSString*)plistName
+{
+    NSString* errorDesc = nil;
+    NSPropertyListFormat format;
+    NSString* plistPath = [[NSBundle mainBundle] pathForResource:plistName ofType:@"plist"];
+    NSData* plistXML = [[NSFileManager defaultManager] contentsAtPath:plistPath];
+    NSDictionary* temp = (NSDictionary*)[NSPropertyListSerialization
+        propertyListFromData:plistXML
+            mutabilityOption:NSPropertyListMutableContainersAndLeaves
+                      format:&format errorDescription:&errorDesc];
+
+    return temp;
+}
+
+#pragma mark -
+#pragma mark UIApplicationDelegate impl
+
+/*
+ This method lets your application know that it is about to be terminated and purged from memory entirely
+ */
+- (void)onAppWillTerminate:(NSNotification*)notification
+{
+    // empty the tmp directory
+    NSFileManager* fileMgr = [[NSFileManager alloc] init];
+    NSError* __autoreleasing err = nil;
+
+    // clear contents of NSTemporaryDirectory
+    NSString* tempDirectoryPath = NSTemporaryDirectory();
+    NSDirectoryEnumerator* directoryEnumerator = [fileMgr enumeratorAtPath:tempDirectoryPath];
+    NSString* fileName = nil;
+    BOOL result;
+
+    while ((fileName = [directoryEnumerator nextObject])) {
+        NSString* filePath = [tempDirectoryPath stringByAppendingPathComponent:fileName];
+        result = [fileMgr removeItemAtPath:filePath error:&err];
+        if (!result && err) {
+            NSLog(@"Failed to delete: %@ (error: %@)", filePath, err);
+        }
+    }
+}
+
+/*
+ This method is called to let your application know that it is about to move from the active to inactive state.
+ You should use this method to pause ongoing tasks, disable timer, ...
+ */
+- (void)onAppWillResignActive:(NSNotification*)notification
+{
+    // NSLog(@"%@",@"applicationWillResignActive");
+    [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('resign');" scheduledOnRunLoop:NO];
+}
+
+/*
+ In iOS 4.0 and later, this method is called as part of the transition from the background to the inactive state.
+ You can use this method to undo many of the changes you made to your application upon entering the background.
+ invariably followed by applicationDidBecomeActive
+ */
+- (void)onAppWillEnterForeground:(NSNotification*)notification
+{
+    // NSLog(@"%@",@"applicationWillEnterForeground");
+    [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('resume');"];
+}
+
+// This method is called to let your application know that it moved from the inactive to active state.
+- (void)onAppDidBecomeActive:(NSNotification*)notification
+{
+    // NSLog(@"%@",@"applicationDidBecomeActive");
+    [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('active');"];
+}
+
+/*
+ In iOS 4.0 and later, this method is called instead of the applicationWillTerminate: method
+ when the user quits an application that supports background execution.
+ */
+- (void)onAppDidEnterBackground:(NSNotification*)notification
+{
+    // NSLog(@"%@",@"applicationDidEnterBackground");
+    [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('pause', null, true);" scheduledOnRunLoop:NO];
+}
+
+// ///////////////////////
+
+- (void)dealloc
+{
+    [CDVURLProtocol unregisterViewController:self];
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+
+    [CDVUserAgentUtil releaseLock:&_userAgentLockToken];
+    [_commandQueue dispose];
+    [[self.pluginObjects allValues] makeObjectsPerformSelector:@selector(dispose)];
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h b/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h
new file mode 100644
index 0000000..18c1831
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h
@@ -0,0 +1,41 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <UIKit/UIKit.h>
+
+#define kCDVWebViewEngineScriptMessageHandlers @"kCDVWebViewEngineScriptMessageHandlers"
+#define kCDVWebViewEngineUIWebViewDelegate @"kCDVWebViewEngineUIWebViewDelegate"
+#define kCDVWebViewEngineWKNavigationDelegate @"kCDVWebViewEngineWKNavigationDelegate"
+#define kCDVWebViewEngineWKUIDelegate @"kCDVWebViewEngineWKUIDelegate"
+#define kCDVWebViewEngineWebViewPreferences @"kCDVWebViewEngineWebViewPreferences"
+
+@protocol CDVWebViewEngineProtocol <NSObject>
+
+@property (nonatomic, strong, readonly) UIView* engineWebView;
+
+- (id)loadRequest:(NSURLRequest*)request;
+- (id)loadHTMLString:(NSString*)string baseURL:(NSURL*)baseURL;
+- (void)evaluateJavaScript:(NSString*)javaScriptString completionHandler:(void (^)(id, NSError*))completionHandler;
+
+- (NSURL*)URL;
+
+- (instancetype)initWithFrame:(CGRect)frame;
+- (void)updateWithInfo:(NSDictionary*)info;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVWhitelist.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVWhitelist.h b/CordovaLib/Classes/Public/CDVWhitelist.h
new file mode 100644
index 0000000..9165097
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVWhitelist.h
@@ -0,0 +1,34 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+extern NSString* const kCDVDefaultWhitelistRejectionString;
+
+@interface CDVWhitelist : NSObject
+
+@property (nonatomic, copy) NSString* whitelistRejectionFormatString;
+
+- (id)initWithArray:(NSArray*)array;
+- (BOOL)schemeIsAllowed:(NSString*)scheme;
+- (BOOL)URLIsAllowed:(NSURL*)url;
+- (BOOL)URLIsAllowed:(NSURL*)url logFailure:(BOOL)logFailure;
+- (NSString*)errorStringForURL:(NSURL*)url;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVWhitelist.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVWhitelist.m b/CordovaLib/Classes/Public/CDVWhitelist.m
new file mode 100644
index 0000000..8e3be75
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVWhitelist.m
@@ -0,0 +1,285 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVWhitelist.h"
+
+NSString* const kCDVDefaultWhitelistRejectionString = @"ERROR whitelist rejection: url='%@'";
+NSString* const kCDVDefaultSchemeName = @"cdv-default-scheme";
+
+@interface CDVWhitelistPattern : NSObject {
+    @private
+    NSRegularExpression* _scheme;
+    NSRegularExpression* _host;
+    NSNumber* _port;
+    NSRegularExpression* _path;
+}
+
++ (NSString*)regexFromPattern:(NSString*)pattern allowWildcards:(bool)allowWildcards;
+- (id)initWithScheme:(NSString*)scheme host:(NSString*)host port:(NSString*)port path:(NSString*)path;
+- (bool)matches:(NSURL*)url;
+
+@end
+
+@implementation CDVWhitelistPattern
+
++ (NSString*)regexFromPattern:(NSString*)pattern allowWildcards:(bool)allowWildcards
+{
+    NSString* regex = [NSRegularExpression escapedPatternForString:pattern];
+
+    if (allowWildcards) {
+        regex = [regex stringByReplacingOccurrencesOfString:@"\\*" withString:@".*"];
+
+        /* [NSURL path] has the peculiarity that a trailing slash at the end of a path
+         * will be omitted. This regex tweak compensates for that.
+         */
+        if ([regex hasSuffix:@"\\/.*"]) {
+            regex = [NSString stringWithFormat:@"%@(\\/.*)?", [regex substringToIndex:([regex length] - 4)]];
+        }
+    }
+    return [NSString stringWithFormat:@"%@$", regex];
+}
+
+- (id)initWithScheme:(NSString*)scheme host:(NSString*)host port:(NSString*)port path:(NSString*)path
+{
+    self = [super init];  // Potentially change "self"
+    if (self) {
+        if ((scheme == nil) || [scheme isEqualToString:@"*"]) {
+            _scheme = nil;
+        } else {
+            _scheme = [NSRegularExpression regularExpressionWithPattern:[CDVWhitelistPattern regexFromPattern:scheme allowWildcards:NO] options:NSRegularExpressionCaseInsensitive error:nil];
+        }
+        if ([host isEqualToString:@"*"]) {
+            _host = nil;
+        } else if ([host hasPrefix:@"*."]) {
+            _host = [NSRegularExpression regularExpressionWithPattern:[NSString stringWithFormat:@"([a-z0-9.-]*\\.)?%@", [CDVWhitelistPattern regexFromPattern:[host substringFromIndex:2] allowWildcards:false]] options:NSRegularExpressionCaseInsensitive error:nil];
+        } else {
+            _host = [NSRegularExpression regularExpressionWithPattern:[CDVWhitelistPattern regexFromPattern:host allowWildcards:NO] options:NSRegularExpressionCaseInsensitive error:nil];
+        }
+        if ((port == nil) || [port isEqualToString:@"*"]) {
+            _port = nil;
+        } else {
+            _port = [[NSNumber alloc] initWithInteger:[port integerValue]];
+        }
+        if ((path == nil) || [path isEqualToString:@"/*"]) {
+            _path = nil;
+        } else {
+            _path = [NSRegularExpression regularExpressionWithPattern:[CDVWhitelistPattern regexFromPattern:path allowWildcards:YES] options:0 error:nil];
+        }
+    }
+    return self;
+}
+
+- (bool)matches:(NSURL*)url
+{
+    return (_scheme == nil || [_scheme numberOfMatchesInString:[url scheme] options:NSMatchingAnchored range:NSMakeRange(0, [[url scheme] length])]) &&
+           (_host == nil || [_host numberOfMatchesInString:[url host] options:NSMatchingAnchored range:NSMakeRange(0, [[url host] length])]) &&
+           (_port == nil || [[url port] isEqualToNumber:_port]) &&
+           (_path == nil || [_path numberOfMatchesInString:[url path] options:NSMatchingAnchored range:NSMakeRange(0, [[url path] length])])
+    ;
+}
+
+@end
+
+@interface CDVWhitelist ()
+
+@property (nonatomic, readwrite, strong) NSMutableArray* whitelist;
+@property (nonatomic, readwrite, strong) NSMutableSet* permittedSchemes;
+
+- (void)addWhiteListEntry:(NSString*)pattern;
+
+@end
+
+@implementation CDVWhitelist
+
+@synthesize whitelist, permittedSchemes, whitelistRejectionFormatString;
+
+- (id)initWithArray:(NSArray*)array
+{
+    self = [super init];
+    if (self) {
+        self.whitelist = [[NSMutableArray alloc] init];
+        self.permittedSchemes = [[NSMutableSet alloc] init];
+        self.whitelistRejectionFormatString = kCDVDefaultWhitelistRejectionString;
+
+        for (NSString* pattern in array) {
+            [self addWhiteListEntry:pattern];
+        }
+    }
+    return self;
+}
+
+- (BOOL)isIPv4Address:(NSString*)externalHost
+{
+    // an IPv4 address has 4 octets b.b.b.b where b is a number between 0 and 255.
+    // for our purposes, b can also be the wildcard character '*'
+
+    // we could use a regex to solve this problem but then I would have two problems
+    // anyways, this is much clearer and maintainable
+    NSArray* octets = [externalHost componentsSeparatedByString:@"."];
+    NSUInteger num_octets = [octets count];
+
+    // quick check
+    if (num_octets != 4) {
+        return NO;
+    }
+
+    // restrict number parsing to 0-255
+    NSNumberFormatter* numberFormatter = [[NSNumberFormatter alloc] init];
+    [numberFormatter setMinimum:[NSNumber numberWithUnsignedInteger:0]];
+    [numberFormatter setMaximum:[NSNumber numberWithUnsignedInteger:255]];
+
+    // iterate through each octet, and test for a number between 0-255 or if it equals '*'
+    for (NSUInteger i = 0; i < num_octets; ++i) {
+        NSString* octet = [octets objectAtIndex:i];
+
+        if ([octet isEqualToString:@"*"]) { // passes - check next octet
+            continue;
+        } else if ([numberFormatter numberFromString:octet] == nil) { // fails - not a number and not within our range, return
+            return NO;
+        }
+    }
+
+    return YES;
+}
+
+- (void)addWhiteListEntry:(NSString*)origin
+{
+    if (self.whitelist == nil) {
+        return;
+    }
+
+    if ([origin isEqualToString:@"*"]) {
+        NSLog(@"Unlimited access to network resources");
+        self.whitelist = nil;
+        self.permittedSchemes = nil;
+    } else { // specific access
+        NSRegularExpression* parts = [NSRegularExpression regularExpressionWithPattern:@"^((\\*|[A-Za-z-]+)://)?(((\\*\\.)?[^*/:]+)|\\*)?(:(\\d+))?(/.*)?" options:0 error:nil];
+        NSTextCheckingResult* m = [parts firstMatchInString:origin options:NSMatchingAnchored range:NSMakeRange(0, [origin length])];
+        if (m != nil) {
+            NSRange r;
+            NSString* scheme = nil;
+            r = [m rangeAtIndex:2];
+            if (r.location != NSNotFound) {
+                scheme = [origin substringWithRange:r];
+            }
+
+            NSString* host = nil;
+            r = [m rangeAtIndex:3];
+            if (r.location != NSNotFound) {
+                host = [origin substringWithRange:r];
+            }
+
+            // Special case for two urls which are allowed to have empty hosts
+            if (([scheme isEqualToString:@"file"] || [scheme isEqualToString:@"content"]) && (host == nil)) {
+                host = @"*";
+            }
+
+            NSString* port = nil;
+            r = [m rangeAtIndex:7];
+            if (r.location != NSNotFound) {
+                port = [origin substringWithRange:r];
+            }
+
+            NSString* path = nil;
+            r = [m rangeAtIndex:8];
+            if (r.location != NSNotFound) {
+                path = [origin substringWithRange:r];
+            }
+
+            if (scheme == nil) {
+                // XXX making it stupid friendly for people who forget to include protocol/SSL
+                [self.whitelist addObject:[[CDVWhitelistPattern alloc] initWithScheme:@"http" host:host port:port path:path]];
+                [self.whitelist addObject:[[CDVWhitelistPattern alloc] initWithScheme:@"https" host:host port:port path:path]];
+            } else {
+                [self.whitelist addObject:[[CDVWhitelistPattern alloc] initWithScheme:scheme host:host port:port path:path]];
+            }
+
+            if (self.permittedSchemes != nil) {
+                if ([scheme isEqualToString:@"*"]) {
+                    self.permittedSchemes = nil;
+                } else if (scheme != nil) {
+                    [self.permittedSchemes addObject:scheme];
+                }
+            }
+        }
+    }
+}
+
+- (BOOL)schemeIsAllowed:(NSString*)scheme
+{
+    if ([scheme isEqualToString:@"http"] ||
+        [scheme isEqualToString:@"https"] ||
+        [scheme isEqualToString:@"ftp"] ||
+        [scheme isEqualToString:@"ftps"]) {
+        return YES;
+    }
+
+    return (self.permittedSchemes == nil) || [self.permittedSchemes containsObject:scheme];
+}
+
+- (BOOL)URLIsAllowed:(NSURL*)url
+{
+    return [self URLIsAllowed:url logFailure:YES];
+}
+
+- (BOOL)URLIsAllowed:(NSURL*)url logFailure:(BOOL)logFailure
+{
+    // Shortcut acceptance: Are all urls whitelisted ("*" in whitelist)?
+    if (whitelist == nil) {
+        return YES;
+    }
+
+    // Shortcut rejection: Check that the scheme is supported
+    NSString* scheme = [[url scheme] lowercaseString];
+    if (![self schemeIsAllowed:scheme]) {
+        if (logFailure) {
+            NSLog(@"%@", [self errorStringForURL:url]);
+        }
+        return NO;
+    }
+
+    // http[s] and ftp[s] should also validate against the common set in the kCDVDefaultSchemeName list
+    if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || [scheme isEqualToString:@"ftp"] || [scheme isEqualToString:@"ftps"]) {
+        NSURL* newUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@://%@%@", kCDVDefaultSchemeName, [url host], [[url path] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
+        // If it is allowed, we are done.  If not, continue to check for the actual scheme-specific list
+        if ([self URLIsAllowed:newUrl logFailure:NO]) {
+            return YES;
+        }
+    }
+
+    // Check the url against patterns in the whitelist
+    for (CDVWhitelistPattern* p in self.whitelist) {
+        if ([p matches:url]) {
+            return YES;
+        }
+    }
+
+    if (logFailure) {
+        NSLog(@"%@", [self errorStringForURL:url]);
+    }
+    // if we got here, the url host is not in the white-list, do nothing
+    return NO;
+}
+
+- (NSString*)errorStringForURL:(NSURL*)url
+{
+    return [NSString stringWithFormat:self.whitelistRejectionFormatString, [url absoluteString]];
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/NSData+Base64.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/NSData+Base64.h b/CordovaLib/Classes/Public/NSData+Base64.h
new file mode 100644
index 0000000..02d960c
--- /dev/null
+++ b/CordovaLib/Classes/Public/NSData+Base64.h
@@ -0,0 +1,43 @@
+//
+//  NSData+Base64.h
+//  base64
+//
+//  Created by Matt Gallagher on 2009/06/03.
+//  Copyright 2009 Matt Gallagher. All rights reserved.
+//
+//  This software is provided 'as-is', without any express or implied
+//  warranty. In no event will the authors be held liable for any damages
+//  arising from the use of this software. Permission is granted to anyone to
+//  use this software for any purpose, including commercial applications, and to
+//  alter it and redistribute it freely, subject to the following restrictions:
+//
+//  1. The origin of this software must not be misrepresented; you must not
+//     claim that you wrote the original software. If you use this software
+//     in a product, an acknowledgment in the product documentation would be
+//     appreciated but is not required.
+//  2. Altered source versions must be plainly marked as such, and must not be
+//     misrepresented as being the original software.
+//  3. This notice may not be removed or altered from any source
+//     distribution.
+//
+
+#import <Foundation/Foundation.h>
+#import "CDVAvailabilityDeprecated.h"
+
+void *CDVNewBase64Decode(
+    const char* inputBuffer,
+    size_t    length,
+    size_t    * outputLength);
+
+char *CDVNewBase64Encode(
+    const void* inputBuffer,
+    size_t    length,
+    bool      separateLines,
+    size_t    * outputLength);
+
+@interface NSData (CDVBase64)
+
++ (NSData*)cdv_dataFromBase64String:(NSString*)aString;
+- (NSString*)cdv_base64EncodedString;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/NSData+Base64.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/NSData+Base64.m b/CordovaLib/Classes/Public/NSData+Base64.m
new file mode 100644
index 0000000..43560f0
--- /dev/null
+++ b/CordovaLib/Classes/Public/NSData+Base64.m
@@ -0,0 +1,298 @@
+//
+//  NSData+Base64.m
+//  base64
+//
+//  Created by Matt Gallagher on 2009/06/03.
+//  Copyright 2009 Matt Gallagher. All rights reserved.
+//
+//  This software is provided 'as-is', without any express or implied
+//  warranty. In no event will the authors be held liable for any damages
+//  arising from the use of this software. Permission is granted to anyone to
+//  use this software for any purpose, including commercial applications, and to
+//  alter it and redistribute it freely, subject to the following restrictions:
+//
+//  1. The origin of this software must not be misrepresented; you must not
+//     claim that you wrote the original software. If you use this software
+//     in a product, an acknowledgment in the product documentation would be
+//     appreciated but is not required.
+//  2. Altered source versions must be plainly marked as such, and must not be
+//     misrepresented as being the original software.
+//  3. This notice may not be removed or altered from any source
+//     distribution.
+//
+
+#import "NSData+Base64.h"
+
+//
+// Mapping from 6 bit pattern to ASCII character.
+//
+static unsigned char base64EncodeLookup[65] =
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+//
+// Definition for "masked-out" areas of the base64DecodeLookup mapping
+//
+#define xx 65
+
+//
+// Mapping from ASCII character to 6 bit pattern.
+//
+static unsigned char base64DecodeLookup[256] =
+{
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 62, xx, xx, xx, 63,
+    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, xx, xx, xx, xx, xx, xx,
+    xx, 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  10, 11, 12, 13, 14,
+    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, xx, xx, xx, xx, xx,
+    xx, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+};
+
+//
+// Fundamental sizes of the binary and base64 encode/decode units in bytes
+//
+#define BINARY_UNIT_SIZE 3
+#define BASE64_UNIT_SIZE 4
+
+//
+// NewBase64Decode
+//
+// Decodes the base64 ASCII string in the inputBuffer to a newly malloced
+// output buffer.
+//
+//  inputBuffer - the source ASCII string for the decode
+//	length - the length of the string or -1 (to specify strlen should be used)
+//	outputLength - if not-NULL, on output will contain the decoded length
+//
+// returns the decoded buffer. Must be free'd by caller. Length is given by
+//	outputLength.
+//
+void *CDVNewBase64Decode(
+    const char* inputBuffer,
+    size_t    length,
+    size_t    * outputLength)
+{
+    if (length == -1) {
+        length = strlen(inputBuffer);
+    }
+
+    size_t outputBufferSize =
+        ((length + BASE64_UNIT_SIZE - 1) / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE;
+    unsigned char* outputBuffer = (unsigned char*)malloc(outputBufferSize);
+
+    size_t i = 0;
+    size_t j = 0;
+
+    while (i < length) {
+        //
+        // Accumulate 4 valid characters (ignore everything else)
+        //
+        unsigned char accumulated[BASE64_UNIT_SIZE];
+        size_t accumulateIndex = 0;
+
+        while (i < length) {
+            unsigned char decode = base64DecodeLookup[inputBuffer[i++]];
+            if (decode != xx) {
+                accumulated[accumulateIndex] = decode;
+                accumulateIndex++;
+
+                if (accumulateIndex == BASE64_UNIT_SIZE) {
+                    break;
+                }
+            }
+        }
+
+        //
+        // Store the 6 bits from each of the 4 characters as 3 bytes
+        //
+        // (Uses improved bounds checking suggested by Alexandre Colucci)
+        //
+        if (accumulateIndex >= 2) {
+            outputBuffer[j] = (accumulated[0] << 2) | (accumulated[1] >> 4);
+        }
+        if (accumulateIndex >= 3) {
+            outputBuffer[j + 1] = (accumulated[1] << 4) | (accumulated[2] >> 2);
+        }
+        if (accumulateIndex >= 4) {
+            outputBuffer[j + 2] = (accumulated[2] << 6) | accumulated[3];
+        }
+        j += accumulateIndex - 1;
+    }
+
+    if (outputLength) {
+        *outputLength = j;
+    }
+    return outputBuffer;
+}
+
+//
+// NewBase64Encode
+//
+// Encodes the arbitrary data in the inputBuffer as base64 into a newly malloced
+// output buffer.
+//
+//  inputBuffer - the source data for the encode
+//	length - the length of the input in bytes
+//  separateLines - if zero, no CR/LF characters will be added. Otherwise
+//		a CR/LF pair will be added every 64 encoded chars.
+//	outputLength - if not-NULL, on output will contain the encoded length
+//		(not including terminating 0 char)
+//
+// returns the encoded buffer. Must be free'd by caller. Length is given by
+//	outputLength.
+//
+char *CDVNewBase64Encode(
+    const void* buffer,
+    size_t    length,
+    bool      separateLines,
+    size_t    * outputLength)
+{
+    const unsigned char* inputBuffer = (const unsigned char*)buffer;
+
+#define MAX_NUM_PADDING_CHARS 2
+#define OUTPUT_LINE_LENGTH 64
+#define INPUT_LINE_LENGTH ((OUTPUT_LINE_LENGTH / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE)
+#define CR_LF_SIZE 2
+
+    //
+    // Byte accurate calculation of final buffer size
+    //
+    size_t outputBufferSize =
+        ((length / BINARY_UNIT_SIZE)
+        + ((length % BINARY_UNIT_SIZE) ? 1 : 0))
+        * BASE64_UNIT_SIZE;
+    if (separateLines) {
+        outputBufferSize +=
+            (outputBufferSize / OUTPUT_LINE_LENGTH) * CR_LF_SIZE;
+    }
+
+    //
+    // Include space for a terminating zero
+    //
+    outputBufferSize += 1;
+
+    //
+    // Allocate the output buffer
+    //
+    char* outputBuffer = (char*)malloc(outputBufferSize);
+    if (!outputBuffer) {
+        return NULL;
+    }
+
+    size_t i = 0;
+    size_t j = 0;
+    const size_t lineLength = separateLines ? INPUT_LINE_LENGTH : length;
+    size_t lineEnd = lineLength;
+
+    while (true) {
+        if (lineEnd > length) {
+            lineEnd = length;
+        }
+
+        for (; i + BINARY_UNIT_SIZE - 1 < lineEnd; i += BINARY_UNIT_SIZE) {
+            //
+            // Inner loop: turn 48 bytes into 64 base64 characters
+            //
+            outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
+            outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
+                | ((inputBuffer[i + 1] & 0xF0) >> 4)];
+            outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i + 1] & 0x0F) << 2)
+                | ((inputBuffer[i + 2] & 0xC0) >> 6)];
+            outputBuffer[j++] = base64EncodeLookup[inputBuffer[i + 2] & 0x3F];
+        }
+
+        if (lineEnd == length) {
+            break;
+        }
+
+        //
+        // Add the newline
+        //
+        // outputBuffer[j++] = '\r';
+        // outputBuffer[j++] = '\n';
+        lineEnd += lineLength;
+    }
+
+    if (i + 1 < length) {
+        //
+        // Handle the single '=' case
+        //
+        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
+        outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
+            | ((inputBuffer[i + 1] & 0xF0) >> 4)];
+        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i + 1] & 0x0F) << 2];
+        outputBuffer[j++] = '=';
+    } else if (i < length) {
+        //
+        // Handle the double '=' case
+        //
+        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
+        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0x03) << 4];
+        outputBuffer[j++] = '=';
+        outputBuffer[j++] = '=';
+    }
+    outputBuffer[j] = 0;
+
+    //
+    // Set the output length and return the buffer
+    //
+    if (outputLength) {
+        *outputLength = j;
+    }
+    return outputBuffer;
+}
+
+@implementation NSData (CDVBase64)
+
+//
+// dataFromBase64String:
+//
+// Creates an NSData object containing the base64 decoded representation of
+// the base64 string 'aString'
+//
+// Parameters:
+//    aString - the base64 string to decode
+//
+// returns the autoreleased NSData representation of the base64 string
+//
++ (NSData*)cdv_dataFromBase64String:(NSString*)aString
+{
+    size_t outputLength = 0;
+    void* outputBuffer = CDVNewBase64Decode([aString UTF8String], [aString length], &outputLength);
+
+    return [NSData dataWithBytesNoCopy:outputBuffer length:outputLength freeWhenDone:YES];
+}
+
+//
+// base64EncodedString
+//
+// Creates an NSString object that contains the base 64 encoding of the
+// receiver's data. Lines are broken at 64 characters long.
+//
+// returns an autoreleased NSString being the base 64 representation of the
+//	receiver.
+//
+- (NSString*)cdv_base64EncodedString
+{
+    size_t outputLength = 0;
+    char* outputBuffer =
+        CDVNewBase64Encode([self bytes], [self length], true, &outputLength);
+
+    NSString* result = [[NSString alloc] initWithBytesNoCopy:outputBuffer
+                                                      length:outputLength
+                                                    encoding:NSASCIIStringEncoding
+                                                freeWhenDone:YES];
+
+    return result;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.h b/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.h
new file mode 100644
index 0000000..9be2be2
--- /dev/null
+++ b/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.h
@@ -0,0 +1,35 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+@interface NSDictionary (CordovaPreferences)
+
+- (id)cordovaSettingForKey:(NSString*)key;
+- (BOOL)cordovaBoolSettingForKey:(NSString*)key defaultValue:(BOOL)defaultValue;
+- (CGFloat)cordovaFloatSettingForKey:(NSString*)key defaultValue:(CGFloat)defaultValue;
+
+@end
+
+@interface NSMutableDictionary (CordovaPreferences)
+
+- (void)setCordovaSetting:(id)value forKey:(NSString*)key;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.m b/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.m
new file mode 100644
index 0000000..dcac40f
--- /dev/null
+++ b/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.m
@@ -0,0 +1,63 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "NSDictionary+CordovaPreferences.h"
+#import <Foundation/Foundation.h>
+
+@implementation NSDictionary (CordovaPreferences)
+
+- (id)cordovaSettingForKey:(NSString*)key
+{
+    return [self objectForKey:[key lowercaseString]];
+}
+
+- (BOOL)cordovaBoolSettingForKey:(NSString*)key defaultValue:(BOOL)defaultValue
+{
+    BOOL value = defaultValue;
+    id prefObj = [self cordovaSettingForKey:key];
+
+    if (prefObj != nil) {
+        value = [(NSNumber*)prefObj boolValue];
+    }
+
+    return value;
+}
+
+- (CGFloat)cordovaFloatSettingForKey:(NSString*)key defaultValue:(CGFloat)defaultValue
+{
+    CGFloat value = defaultValue;
+    id prefObj = [self cordovaSettingForKey:key];
+
+    if (prefObj != nil) {
+        value = [prefObj floatValue];
+    }
+
+    return value;
+}
+
+@end
+
+@implementation NSMutableDictionary (CordovaPreferences)
+
+- (void)setCordovaSetting:(id)value forKey:(NSString*)key
+{
+    [self setObject:value forKey:[key lowercaseString]];
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h b/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h
new file mode 100644
index 0000000..79e6516
--- /dev/null
+++ b/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h
@@ -0,0 +1,29 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface NSMutableArray (QueueAdditions)
+
+- (id)cdv_pop;
+- (id)cdv_queueHead;
+- (id)cdv_dequeue;
+- (void)cdv_enqueue:(id)obj;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.m b/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.m
new file mode 100644
index 0000000..2b3acdc
--- /dev/null
+++ b/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.m
@@ -0,0 +1,58 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "NSMutableArray+QueueAdditions.h"
+
+@implementation NSMutableArray (QueueAdditions)
+
+- (id)cdv_queueHead
+{
+    if ([self count] == 0) {
+        return nil;
+    }
+
+    return [self objectAtIndex:0];
+}
+
+- (__autoreleasing id)cdv_dequeue
+{
+    if ([self count] == 0) {
+        return nil;
+    }
+
+    id head = [self objectAtIndex:0];
+    if (head != nil) {
+        // [[head retain] autorelease]; ARC - the __autoreleasing on the return value should so the same thing
+        [self removeObjectAtIndex:0];
+    }
+
+    return head;
+}
+
+- (id)cdv_pop
+{
+    return [self cdv_dequeue];
+}
+
+- (void)cdv_enqueue:(id)object
+{
+    [self addObject:object];
+}
+
+@end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[22/50] [abbrv] ios commit: CB-5520 - Added cordova/build*.xcconfig support in the default template (IDE use)

Posted by ia...@apache.org.
CB-5520 - Added cordova/build*.xcconfig support in the default template (IDE use)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/abf65c2a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/abf65c2a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/abf65c2a

Branch: refs/heads/unplug-whitelist
Commit: abf65c2af1fc199de6b4173cf14c688b8175930a
Parents: 67179ad
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Mar 17 00:00:56 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Mar 17 00:00:56 2015 -0700

----------------------------------------------------------------------
 .../project/__CLI__.xcodeproj/project.pbxproj   | 24 ++++++++++++++++++++
 .../__NON-CLI__.xcodeproj/project.pbxproj       | 24 ++++++++++++++++++++
 2 files changed, 48 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/abf65c2a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
index 725ce17..3e0b693 100755
--- a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
@@ -13,6 +13,9 @@
 		301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; };
 		302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; };
 		302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; };
+		3047A5121AB8059700498E2A /* build-debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; };
+		3047A5131AB8059700498E2A /* build-release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A5101AB8059700498E2A /* build-release.xcconfig */; };
+		3047A5141AB8059700498E2A /* build.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A5111AB8059700498E2A /* build.xcconfig */; };
 		305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */; };
 		3088BBBD154F3926009F9C59 /* Default-Landscape@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */; };
 		3088BBBE154F3926009F9C59 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */; };
@@ -72,6 +75,9 @@
 		302D95EE14D2391D003F00A1 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
 		302D95EF14D2391D003F00A1 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
 		302D95F014D2391D003F00A1 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = "<group>"; };
+		3047A50F1AB8059700498E2A /* build-debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-debug.xcconfig"; path = cordova/build-debug.xcconfig; sourceTree = SOURCE_ROOT; };
+		3047A5101AB8059700498E2A /* build-release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-release.xcconfig"; path = cordova/build-release.xcconfig; sourceTree = SOURCE_ROOT; };
+		3047A5111AB8059700498E2A /* build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = build.xcconfig; path = cordova/build.xcconfig; sourceTree = SOURCE_ROOT; };
 		305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
 		3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape@2x~ipad.png"; sourceTree = "<group>"; };
 		3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape~ipad.png"; sourceTree = "<group>"; };
@@ -176,6 +182,7 @@
 		29B97317FDCFA39411CA2CEA /* Resources */ = {
 			isa = PBXGroup;
 			children = (
+				3047A50E1AB8057F00498E2A /* config */,
 				308D052D1370CCF300D202BF /* icons */,
 				308D05311370CCF300D202BF /* splash */,
 				8D1107310486CEB800E47090 /* __PROJECT_NAME__-Info.plist */,
@@ -202,6 +209,16 @@
 			name = Products;
 			sourceTree = "<group>";
 		};
+		3047A50E1AB8057F00498E2A /* config */ = {
+			isa = PBXGroup;
+			children = (
+				3047A50F1AB8059700498E2A /* build-debug.xcconfig */,
+				3047A5101AB8059700498E2A /* build-release.xcconfig */,
+				3047A5111AB8059700498E2A /* build.xcconfig */,
+			);
+			name = config;
+			sourceTree = "<group>";
+		};
 		307C750510C5A3420062BCA9 /* Plugins */ = {
 			isa = PBXGroup;
 			children = (
@@ -343,10 +360,12 @@
 				7E7966E31810823500FA85AD /* icon-60@2x.png in Resources */,
 				7E7966E61810823500FA85AD /* icon-small.png in Resources */,
 				3088BBBD154F3926009F9C59 /* Default-Landscape@2x~ipad.png in Resources */,
+				3047A5131AB8059700498E2A /* build-release.xcconfig in Resources */,
 				3088BBBE154F3926009F9C59 /* Default-Landscape~ipad.png in Resources */,
 				3088BBBF154F3926009F9C59 /* Default-Portrait@2x~ipad.png in Resources */,
 				7E7966E71810823500FA85AD /* icon-small@2x.png in Resources */,
 				3088BBC0154F3926009F9C59 /* Default-Portrait~ipad.png in Resources */,
+				3047A5141AB8059700498E2A /* build.xcconfig in Resources */,
 				30B4F30019D5E07200D9F7D8 /* Default-667h.png in Resources */,
 				7E7966DE1810823500FA85AD /* icon-40.png in Resources */,
 				3088BBC1154F3926009F9C59 /* Default@2x~iphone.png in Resources */,
@@ -356,6 +375,7 @@
 				30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */,
 				30C1856619D5FC0A00212699 /* icon-60@3x.png in Resources */,
 				7E7966E11810823500FA85AD /* icon-50@2x.png in Resources */,
+				3047A5121AB8059700498E2A /* build-debug.xcconfig in Resources */,
 				7E7966E51810823500FA85AD /* icon-76@2x.png in Resources */,
 				30FC414916E50CA1004E6F35 /* icon-72@2x.png in Resources */,
 			);
@@ -405,6 +425,7 @@
 /* Begin XCBuildConfiguration section */
 		1D6058940D05DD3E006BFB54 /* Debug */ = {
 			isa = XCBuildConfiguration;
+			baseConfigurationReference = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ENABLE_MODULES = YES;
@@ -438,6 +459,7 @@
 		};
 		1D6058950D05DD3E006BFB54 /* Release */ = {
 			isa = XCBuildConfiguration;
+			baseConfigurationReference = 3047A5101AB8059700498E2A /* build-release.xcconfig */;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ENABLE_MODULES = YES;
@@ -469,6 +491,7 @@
 		};
 		C01FCF4F08A954540054247B /* Debug */ = {
 			isa = XCBuildConfiguration;
+			baseConfigurationReference = 3047A5111AB8059700498E2A /* build.xcconfig */;
 			buildSettings = {
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
@@ -515,6 +538,7 @@
 		};
 		C01FCF5008A954540054247B /* Release */ = {
 			isa = XCBuildConfiguration;
+			baseConfigurationReference = 3047A5111AB8059700498E2A /* build.xcconfig */;
 			buildSettings = {
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/abf65c2a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
index e0f5ce8..3c01d76 100755
--- a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
@@ -15,6 +15,9 @@
 		302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; };
 		305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */; };
 		3074132519D5FC77000C6D87 /* icon-60@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3074132419D5FC77000C6D87 /* icon-60@3x.png */; };
+		30761BD21AB7FCF100D046E3 /* build-debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 30761BCF1AB7FCF100D046E3 /* build-debug.xcconfig */; };
+		30761BD31AB7FCF100D046E3 /* build-release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 30761BD01AB7FCF100D046E3 /* build-release.xcconfig */; };
+		30761BD41AB7FCF100D046E3 /* build.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 30761BD11AB7FCF100D046E3 /* build.xcconfig */; };
 		3088BBBD154F3926009F9C59 /* Default-Landscape@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */; };
 		3088BBBE154F3926009F9C59 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */; };
 		3088BBBF154F3926009F9C59 /* Default-Portrait@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */; };
@@ -72,6 +75,9 @@
 		302D95F014D2391D003F00A1 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = "<group>"; };
 		305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
 		3074132419D5FC77000C6D87 /* icon-60@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-60@3x.png"; sourceTree = "<group>"; };
+		30761BCF1AB7FCF100D046E3 /* build-debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-debug.xcconfig"; path = "cordova/build-debug.xcconfig"; sourceTree = SOURCE_ROOT; };
+		30761BD01AB7FCF100D046E3 /* build-release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-release.xcconfig"; path = "cordova/build-release.xcconfig"; sourceTree = SOURCE_ROOT; };
+		30761BD11AB7FCF100D046E3 /* build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = build.xcconfig; path = cordova/build.xcconfig; sourceTree = SOURCE_ROOT; };
 		3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape@2x~ipad.png"; sourceTree = "<group>"; };
 		3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape~ipad.png"; sourceTree = "<group>"; };
 		3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait@2x~ipad.png"; sourceTree = "<group>"; };
@@ -169,6 +175,7 @@
 		29B97317FDCFA39411CA2CEA /* Resources */ = {
 			isa = PBXGroup;
 			children = (
+				3034A3FB1AB8044400DC33D6 /* config */,
 				308D052D1370CCF300D202BF /* icons */,
 				308D05311370CCF300D202BF /* splash */,
 				8D1107310486CEB800E47090 /* __PROJECT_NAME__-Info.plist */,
@@ -195,6 +202,16 @@
 			name = Products;
 			sourceTree = "<group>";
 		};
+		3034A3FB1AB8044400DC33D6 /* config */ = {
+			isa = PBXGroup;
+			children = (
+				30761BD11AB7FCF100D046E3 /* build.xcconfig */,
+				30761BCF1AB7FCF100D046E3 /* build-debug.xcconfig */,
+				30761BD01AB7FCF100D046E3 /* build-release.xcconfig */,
+			);
+			name = config;
+			sourceTree = "<group>";
+		};
 		307C750510C5A3420062BCA9 /* Plugins */ = {
 			isa = PBXGroup;
 			children = (
@@ -327,10 +344,12 @@
 				7E7966E31810823500FA85AD /* icon-60@2x.png in Resources */,
 				7E7966E61810823500FA85AD /* icon-small.png in Resources */,
 				3088BBBD154F3926009F9C59 /* Default-Landscape@2x~ipad.png in Resources */,
+				30761BD31AB7FCF100D046E3 /* build-release.xcconfig in Resources */,
 				3088BBBE154F3926009F9C59 /* Default-Landscape~ipad.png in Resources */,
 				3088BBBF154F3926009F9C59 /* Default-Portrait@2x~ipad.png in Resources */,
 				7E7966E71810823500FA85AD /* icon-small@2x.png in Resources */,
 				3088BBC0154F3926009F9C59 /* Default-Portrait~ipad.png in Resources */,
+				30761BD41AB7FCF100D046E3 /* build.xcconfig in Resources */,
 				30B4F30719D5E08600D9F7D8 /* Default-667h.png in Resources */,
 				7E7966DE1810823500FA85AD /* icon-40.png in Resources */,
 				3088BBC1154F3926009F9C59 /* Default@2x~iphone.png in Resources */,
@@ -340,6 +359,7 @@
 				30B4F30919D5E08600D9F7D8 /* Default-Landscape-736h.png in Resources */,
 				3074132519D5FC77000C6D87 /* icon-60@3x.png in Resources */,
 				7E7966E11810823500FA85AD /* icon-50@2x.png in Resources */,
+				30761BD21AB7FCF100D046E3 /* build-debug.xcconfig in Resources */,
 				7E7966E51810823500FA85AD /* icon-76@2x.png in Resources */,
 				30FC414916E50CA1004E6F35 /* icon-72@2x.png in Resources */,
 			);
@@ -389,6 +409,7 @@
 /* Begin XCBuildConfiguration section */
 		1D6058940D05DD3E006BFB54 /* Debug */ = {
 			isa = XCBuildConfiguration;
+			baseConfigurationReference = 30761BCF1AB7FCF100D046E3 /* build-debug.xcconfig */;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ENABLE_MODULES = YES;
@@ -422,6 +443,7 @@
 		};
 		1D6058950D05DD3E006BFB54 /* Release */ = {
 			isa = XCBuildConfiguration;
+			baseConfigurationReference = 30761BD01AB7FCF100D046E3 /* build-release.xcconfig */;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ENABLE_MODULES = YES;
@@ -453,6 +475,7 @@
 		};
 		C01FCF4F08A954540054247B /* Debug */ = {
 			isa = XCBuildConfiguration;
+			baseConfigurationReference = 30761BD11AB7FCF100D046E3 /* build.xcconfig */;
 			buildSettings = {
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
@@ -499,6 +522,7 @@
 		};
 		C01FCF5008A954540054247B /* Release */ = {
 			isa = XCBuildConfiguration;
+			baseConfigurationReference = 30761BD11AB7FCF100D046E3 /* build.xcconfig */;
 			buildSettings = {
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[21/50] [abbrv] ios commit: CB-8678 - Mismatched case typo in startup plugin name in config.xml

Posted by ia...@apache.org.
CB-8678 - Mismatched case typo in startup plugin name in config.xml


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/67179ad6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/67179ad6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/67179ad6

Branch: refs/heads/unplug-whitelist
Commit: 67179ad64513f7bef24250c15b88b2dd57365a7b
Parents: 5c6b494
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Mar 16 22:40:03 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Mar 16 22:40:03 2015 -0700

----------------------------------------------------------------------
 bin/templates/project/__PROJECT_NAME__/config.xml | 2 +-
 tests/CordovaLibTests/CordovaLibApp/config.xml    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/67179ad6/bin/templates/project/__PROJECT_NAME__/config.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/__PROJECT_NAME__/config.xml b/bin/templates/project/__PROJECT_NAME__/config.xml
index f13f415..96360bb 100644
--- a/bin/templates/project/__PROJECT_NAME__/config.xml
+++ b/bin/templates/project/__PROJECT_NAME__/config.xml
@@ -64,7 +64,7 @@
         <param name="ios-package" value="CDVLocalStorage"/>
     </feature>
     <feature name="HandleOpenUrl">
-        <param name="ios-package" value="CDVHandleOpenUrl"/>
+        <param name="ios-package" value="CDVHandleOpenURL"/>
         <param name="onload" value="true"/>
     </feature>
 </widget>

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/67179ad6/tests/CordovaLibTests/CordovaLibApp/config.xml
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CordovaLibApp/config.xml b/tests/CordovaLibTests/CordovaLibApp/config.xml
index 30bc139..cbfc9ec 100644
--- a/tests/CordovaLibTests/CordovaLibApp/config.xml
+++ b/tests/CordovaLibTests/CordovaLibApp/config.xml
@@ -52,7 +52,7 @@
         <param name="ios-package" value="CDVLocalStorage"/>
     </feature>
     <feature name="HandleOpenUrl">
-        <param name="ios-package" value="CDVHandleOpenUrl"/>
+        <param name="ios-package" value="CDVHandleOpenURL"/>
         <param name="onload" value="true"/>
     </feature>
 </widget>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[07/50] [abbrv] ios commit: CB-8556 - handleOpenURL functionality to be removed to a plugin

Posted by ia...@apache.org.
CB-8556 - handleOpenURL functionality to be removed to a plugin


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/2eea1392
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/2eea1392
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/2eea1392

Branch: refs/heads/unplug-whitelist
Commit: 2eea1392923140ffefd1c994c383b52e1b9c4468
Parents: 962f47c
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Mar 12 17:26:52 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Mar 12 17:26:52 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVViewController.m | 48 -----------------------------
 1 file changed, 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2eea1392/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index e2887e4..79ed2f0 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -868,54 +868,6 @@
 
 // ///////////////////////
 
-- (void)onPageDidLoad:(NSNotification*)notification
-{
-    if (self.openURL) {
-        [self processOpenUrl:self.openURL pageLoaded:YES];
-    }
-}
-
-- (void)processOpenUrl:(NSURL*)url pageLoaded:(BOOL)pageLoaded
-{
-    __weak CDVViewController* weakSelf = self;
-
-    dispatch_block_t handleOpenUrl = ^(void) {
-        NSString* jsString = [NSString stringWithFormat:@"if (typeof handleOpenURL === 'function') { handleOpenURL(\"%@\");}", url];
-        [_webViewEngine evaluateJavaScript:jsString
-                         completionHandler:^(id object, NSError* error) {
-            if (error == nil) {
-                weakSelf.openURL = nil;
-            }
-        }];
-    };
-
-    if (!pageLoaded) {
-        // query the webview for readystate
-        NSString* jsString = @"document.readystate";
-        [_webViewEngine evaluateJavaScript:jsString
-                         completionHandler:^(id object, NSError* error) {
-            if ((error == nil) && [object isKindOfClass:[NSString class]]) {
-                NSString* readyState = (NSString*)object;
-                BOOL ready = [readyState isEqualToString:@"loaded"] || [readyState isEqualToString:@"complete"];
-                if (ready) {
-                    handleOpenUrl();
-                } else {
-                    weakSelf.openURL = url;
-                }
-            }
-        }];
-    } else {
-        handleOpenUrl();
-    }
-}
-
-- (void)processOpenUrl:(NSURL*)url
-{
-    [self processOpenUrl:url pageLoaded:NO];
-}
-
-// ///////////////////////
-
 - (void)dealloc
 {
     [CDVURLProtocol unregisterViewController:self];


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[45/50] [abbrv] ios commit: Document use of new plugin network policy (whitelist) hooks

Posted by ia...@apache.org.
Document use of new plugin network policy (whitelist) hooks


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/656ae1c0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/656ae1c0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/656ae1c0

Branch: refs/heads/unplug-whitelist
Commit: 656ae1c02802cc84bb21e199b8e65085b24b1d50
Parents: 5955096
Author: Ian Clelland <ic...@chromium.org>
Authored: Thu Oct 30 14:12:45 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Mar 19 11:06:30 2015 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDVPlugin.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/656ae1c0/CordovaLib/Classes/Public/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVPlugin.h b/CordovaLib/Classes/Public/CDVPlugin.h
index 54c8afd..ff4c2f5 100644
--- a/CordovaLib/Classes/Public/CDVPlugin.h
+++ b/CordovaLib/Classes/Public/CDVPlugin.h
@@ -64,6 +64,26 @@ extern NSString* const CDVRemoteNotificationError;
  - (void)didReceiveLocalNotification:(NSNotification *)notification;
  */
 
+ /*
+ // These methods may optionally be implemented. If present, they will be called by CVDViewController when network-policy (whitelist) decisions need to be made.
+
+    This method, if present, will be called by CDVURLProtocol to determine whether to block a request for a web resource. If all plugins which implement this method return true, then the request will be allowed. If any plugin returns false, the request will be blocked. If no plugins implement this method, then the default policy will be followed. (See [CDVViewController defaultResourcePolicyForURL:])
+
+    Note that this method will *not* be called for some resources, such as WebSocket connections, and will not be called by WKWebView at all. Please use CSP headers to handle those situations if needed.
+
+ - (BOOL)shouldAllowRequestForURL:(NSURL *)url
+
+
+    This method, if present, will be called by CDVViewController to determine whether webview navigation to a web page should be allowed. If all plugins which implement this method return true, then the navigation will be allowed. If any plugin returns false, the navigation will be blocked. If no plugins implement this method, then the default policy will be followed. (See [CDVViewController defaultResourcePolicyForURL:])
+
+ - (BOOL)shouldAllowNavigationToURL:(NSURL *)url
+
+
+    This method, if present, will be called by CDVViewController to determine whether a web page which is otherwise blocked should be opened in the system browser. If all plugins which implement this method return true, then the page will be opened. If any plugin returns false, the page will not be opened. If no plugins implement this method, then the default policy will be followed. (See [CDVViewController shouldOpenExternalURL:] and [CDVViewController webView:shouldStartLoadWithRequest:navigationType:])
+
+ - (BOOL)shouldOpenExternalURL:(NSURL *)url
+ */
+
 - (id)appDelegate;
 
 @end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[15/50] [abbrv] ios commit: CB-8677 - Remove conditional IsAtLeastIosVersion code (plus style fix-ups)

Posted by ia...@apache.org.
CB-8677 - Remove conditional IsAtLeastIosVersion code (plus style fix-ups)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/3112354f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/3112354f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/3112354f

Branch: refs/heads/unplug-whitelist
Commit: 3112354f45afb57cd275fbb433487b683c5ab96b
Parents: c7fcf30
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Mar 16 16:09:32 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Mar 16 16:09:32 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVLocalStorage.m      |  7 +------
 CordovaLib/Classes/CDVUIWebViewDelegate.m | 13 -------------
 CordovaLib/Classes/CDVViewController.m    | 14 ++++++--------
 3 files changed, 7 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3112354f/CordovaLib/Classes/CDVLocalStorage.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVLocalStorage.m b/CordovaLib/Classes/CDVLocalStorage.m
index 8aec403..252dfaf 100644
--- a/CordovaLib/Classes/CDVLocalStorage.m
+++ b/CordovaLib/Classes/CDVLocalStorage.m
@@ -121,10 +121,9 @@
 
 + (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL*)URL skip:(BOOL)skip
 {
-    NSAssert(IsAtLeastiOSVersion(@"5.1"), @"Cannot mark files for NSURLIsExcludedFromBackupKey on iOS less than 5.1");
-
     NSError* error = nil;
     BOOL success = [URL setResourceValue:[NSNumber numberWithBool:skip] forKey:NSURLIsExcludedFromBackupKey error:&error];
+
     if (!success) {
         NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
     }
@@ -330,10 +329,6 @@
 + (void)__restoreLegacyDatabaseLocationsWithBackupType:(NSString*)backupType
 {
     // on iOS 6, if you toggle between cloud/local backup, you must move database locations.  Default upgrade from iOS5.1 to iOS6 is like a toggle from local to cloud.
-    if (!IsAtLeastiOSVersion(@"6.0")) {
-        return;
-    }
-
     NSString* appLibraryFolder = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0];
     NSString* appDocumentsFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3112354f/CordovaLib/Classes/CDVUIWebViewDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVUIWebViewDelegate.m b/CordovaLib/Classes/CDVUIWebViewDelegate.m
index a248245..01872f6 100644
--- a/CordovaLib/Classes/CDVUIWebViewDelegate.m
+++ b/CordovaLib/Classes/CDVUIWebViewDelegate.m
@@ -278,19 +278,6 @@ static NSString *stripFragment(NSString* url)
     BOOL fireCallback = NO;
     switch (_state) {
         case STATE_IDLE:
-            if (IsAtLeastiOSVersion(@"6.0")) {
-                break;
-            }
-            // If history.go(-1) is used pre-iOS6, the shouldStartLoadWithRequest function is not called.
-            // Without shouldLoad, we can't distinguish an iframe from a top-level navigation.
-            // We could try to distinguish using [UIWebView canGoForward], but that's too much complexity,
-            // and would work only on the first time it was used.
-
-            // Our work-around is to set a JS variable and poll until it disappears (from a navigation).
-            _state = STATE_IOS5_POLLING_FOR_LOAD_START;
-            _loadStartPollCount = 0;
-            [self setLoadToken:webView];
-            [self pollForPageLoadStart:webView];
             break;
 
         case STATE_CANCELLED:

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3112354f/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 26bfa6e..6f271ce 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -130,8 +130,8 @@
 
 - (void)printPlatformVersionWarning
 {
-    if (!IsAtLeastiOSVersion(@"6.0")) {
-        NSLog(@"CRITICAL: For Cordova 3.5.0 and above, you will need to upgrade to at least iOS 6.0 or greater. Your current version of iOS is %@.",
+    if (!IsAtLeastiOSVersion(@"7.0")) {
+        NSLog(@"CRITICAL: For Cordova 4.0.0 and above, you will need to upgrade to at least iOS 7.0 or greater. Your current version of iOS is %@.",
             [[UIDevice currentDevice] systemVersion]
             );
     }
@@ -279,9 +279,7 @@
     }
     [self.settings setCordovaSetting:backupWebStorageType forKey:@"BackupWebStorage"];
 
-    if (IsAtLeastiOSVersion(@"5.1")) {
-        [CDVLocalStorage __fixupDatabaseLocationsWithBackupType:backupWebStorageType];
-    }
+    [CDVLocalStorage __fixupDatabaseLocationsWithBackupType:backupWebStorageType];
 
     // // Instantiate the WebView ///////////////
 
@@ -296,9 +294,9 @@
 
     /*
      * Fire up CDVLocalStorage to work-around WebKit storage limitations: on all iOS 5.1+ versions for local-only backups, but only needed on iOS 5.1 for cloud backup.
+        With minimum iOS 6/7 supported, only first clause applies.
      */
-    if (IsAtLeastiOSVersion(@"5.1") && (([backupWebStorageType isEqualToString:@"local"]) ||
-        ([backupWebStorageType isEqualToString:@"cloud"] && !IsAtLeastiOSVersion(@"6.0")))) {
+    if ([backupWebStorageType isEqualToString:@"local"]) {
         [self registerPlugin:[[CDVLocalStorage alloc] initWithWebViewEngine:self.webViewEngine] withClassName:NSStringFromClass([CDVLocalStorage class])];
     }
 
@@ -695,7 +693,7 @@
 + (NSString*)applicationDocumentsDirectory
 {
     NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
-    NSString* basePath = (([paths count] > 0) ? ([paths objectAtIndex : 0]) : nil);
+    NSString* basePath = (([paths count] > 0) ? ([paths objectAtIndex:0]) : nil);
 
     return basePath;
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[23/50] [abbrv] ios commit: CB-5520 - Removed most Build Settings from .pbxproj to .xcconfig

Posted by ia...@apache.org.
CB-5520 - Removed most Build Settings from .pbxproj to .xcconfig


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/2a54fc1b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/2a54fc1b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/2a54fc1b

Branch: refs/heads/unplug-whitelist
Commit: 2a54fc1b0cd92887fd47af8ef3dfb9de805cc188
Parents: abf65c2
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Mar 17 00:38:47 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Mar 17 00:38:47 2015 -0700

----------------------------------------------------------------------
 .../project/__CLI__.xcodeproj/project.pbxproj   | 69 --------------------
 .../__NON-CLI__.xcodeproj/project.pbxproj       | 68 -------------------
 bin/templates/scripts/cordova/build.xcconfig    |  6 +-
 3 files changed, 5 insertions(+), 138 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2a54fc1b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
index 3e0b693..dcc561b 100755
--- a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
@@ -438,22 +438,8 @@
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					CoreFoundation,
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak-lSystem",
-					"-ObjC",
-				);
 				PRODUCT_NAME = "__PROJECT_NAME__";
-				TARGETED_DEVICE_FAMILY = "1,2";
 			};
 			name = Debug;
 		};
@@ -470,22 +456,7 @@
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
-				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					CoreFoundation,
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak-lSystem",
-					"-ObjC",
-				);
 				PRODUCT_NAME = "__PROJECT_NAME__";
-				TARGETED_DEVICE_FAMILY = "1,2";
 			};
 			name = Release;
 		};
@@ -501,7 +472,6 @@
 				CLANG_WARN_ENUM_CONVERSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				GCC_C_LANGUAGE_STANDARD = c99;
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
@@ -510,29 +480,10 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
-					"\"$(OBJROOT)/UninstalledProducts/include\"",
-					"\"$(BUILT_PRODUCTS_DIR)\"",
-				);
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				ONLY_ACTIVE_ARCH = YES;
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					CoreFoundation,
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak-lSystem",
-					"-ObjC",
-				);
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
 				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
-				USER_HEADER_SEARCH_PATHS = "";
 			};
 			name = Debug;
 		};
@@ -548,7 +499,6 @@
 				CLANG_WARN_ENUM_CONVERSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				GCC_C_LANGUAGE_STANDARD = c99;
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
@@ -557,28 +507,9 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
-					"\"$(OBJROOT)/UninstalledProducts/include\"",
-					"\"$(BUILT_PRODUCTS_DIR)\"",
-				);
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					CoreFoundation,
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak-lSystem",
-					"-ObjC",
-				);
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
 				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
-				USER_HEADER_SEARCH_PATHS = "";
 			};
 			name = Release;
 		};

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2a54fc1b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
index 3c01d76..b1f6491 100755
--- a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
@@ -422,22 +422,8 @@
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					CoreFoundation,
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak-lSystem",
-					"-ObjC",
-				);
 				PRODUCT_NAME = "__PROJECT_NAME__";
-				TARGETED_DEVICE_FAMILY = "1,2";
 			};
 			name = Debug;
 		};
@@ -454,22 +440,8 @@
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					CoreFoundation,
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak-lSystem",
-					"-ObjC",
-				);
 				PRODUCT_NAME = "__PROJECT_NAME__";
-				TARGETED_DEVICE_FAMILY = "1,2";
 			};
 			name = Release;
 		};
@@ -485,7 +457,6 @@
 				CLANG_WARN_ENUM_CONVERSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				GCC_C_LANGUAGE_STANDARD = c99;
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
@@ -494,29 +465,10 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
-					"\"$(OBJROOT)/UninstalledProducts/include\"",
-					"\"$(BUILT_PRODUCTS_DIR)\"",
-				);
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				ONLY_ACTIVE_ARCH = YES;
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					CoreFoundation,
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak-lSystem",
-					"-ObjC",
-				);
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
 				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
-				USER_HEADER_SEARCH_PATHS = "";
 			};
 			name = Debug;
 		};
@@ -532,7 +484,6 @@
 				CLANG_WARN_ENUM_CONVERSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				GCC_C_LANGUAGE_STANDARD = c99;
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
@@ -541,28 +492,9 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
-					"\"$(OBJROOT)/UninstalledProducts/include\"",
-					"\"$(BUILT_PRODUCTS_DIR)\"",
-				);
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					CoreFoundation,
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak-lSystem",
-					"-ObjC",
-				);
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
 				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
-				USER_HEADER_SEARCH_PATHS = "";
 			};
 			name = Release;
 		};

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2a54fc1b/bin/templates/scripts/cordova/build.xcconfig
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/build.xcconfig b/bin/templates/scripts/cordova/build.xcconfig
index 0b89ad0..a7642ad 100644
--- a/bin/templates/scripts/cordova/build.xcconfig
+++ b/bin/templates/scripts/cordova/build.xcconfig
@@ -22,7 +22,11 @@
 // Settings are overridden by configuration-level .xcconfig file (build-release/build-debug).
 //
 
-
+HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include $(OBJROOT)/UninstalledProducts/include $(BUILT_PRODUCTS_DIR)"
+IPHONEOS_DEPLOYMENT_TARGET = 7.0
+OTHER_LDFLAGS = -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -ObjC
+TARGETED_DEVICE_FAMILY = 1,2
+                
 // Type of signing identity used for codesigning, resolves to first match of given type.
 // "iPhone Developer": Development builds (default, local only; iOS Development certificate) or "iPhone Distribution": Distribution builds (Adhoc/In-House/AppStore; iOS Distribution certificate)
 CODE_SIGN_IDENTITY = iPhone Developer


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[03/50] [abbrv] ios commit: CB-8664 - Make CDVPlugin initializer private

Posted by ia...@apache.org.
CB-8664 - Make CDVPlugin initializer private


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/205a6629
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/205a6629
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/205a6629

Branch: refs/heads/unplug-whitelist
Commit: 205a6629e2aef3c1972109c8df2c0ff5fbed8b99
Parents: de02f99
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Mar 12 14:41:08 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Mar 12 14:41:08 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVPlugin+Private.h          | 24 ++++++++++++++++++++
 CordovaLib/Classes/CDVPlugin.h                  |  1 -
 CordovaLib/Classes/CDVPlugin.m                  |  1 +
 CordovaLib/Classes/CDVViewController.m          |  1 +
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj |  7 +++---
 5 files changed, 30 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/205a6629/CordovaLib/Classes/CDVPlugin+Private.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin+Private.h b/CordovaLib/Classes/CDVPlugin+Private.h
new file mode 100644
index 0000000..f88638c
--- /dev/null
+++ b/CordovaLib/Classes/CDVPlugin+Private.h
@@ -0,0 +1,24 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+@interface CDVPlugin (Private)
+
+- (instancetype)initWithWebViewEngine:(id <CDVWebViewEngineProtocol>)theWebViewEngine;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/205a6629/CordovaLib/Classes/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin.h b/CordovaLib/Classes/CDVPlugin.h
index b281923..54c8afd 100644
--- a/CordovaLib/Classes/CDVPlugin.h
+++ b/CordovaLib/Classes/CDVPlugin.h
@@ -47,7 +47,6 @@ extern NSString* const CDVRemoteNotificationError;
 
 @property (readonly, assign) BOOL hasPendingOperation;
 
-- (instancetype)initWithWebViewEngine:(id <CDVWebViewEngineProtocol>)theWebViewEngine;
 - (void)pluginInitialize;
 
 - (void)handleOpenURL:(NSNotification*)notification;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/205a6629/CordovaLib/Classes/CDVPlugin.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin.m b/CordovaLib/Classes/CDVPlugin.m
index 8cc2eac..121e54c 100644
--- a/CordovaLib/Classes/CDVPlugin.m
+++ b/CordovaLib/Classes/CDVPlugin.m
@@ -18,6 +18,7 @@
  */
 
 #import "CDVPlugin.h"
+#import "CDVPlugin+Private.h"
 #import "CDVViewController.h"
 #include <objc/message.h>
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/205a6629/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 6ce262c..e2887e4 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -19,6 +19,7 @@
 
 #import <objc/message.h>
 #import "CDV.h"
+#import "CDVPlugin+Private.h"
 #import "CDVUIWebViewDelegate.h"
 #import "CDVConfigParser.h"
 #import "CDVUserAgentUtil.h"

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/205a6629/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index 45cc66b..c30a128 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -23,7 +23,6 @@
 		306ADAEB1AAA747100CAC885 /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		306ADAEC1AAA753300CAC885 /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		3073E9ED1656D51200957977 /* CDVScreenOrientationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3073E9EC1656D51200957977 /* CDVScreenOrientationDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30B7A65D1A0B73AF0010C630 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B7A65B1A0B73AF0010C630 /* NSDictionary+CordovaPreferences.m */; };
 		30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C6847E1406CB38004C1A8E /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C6847F1406CB38004C1A8E /* CDVWhitelist.m */; };
 		30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C684921407044A004C1A8E /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -34,6 +33,7 @@
 		30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7E14B5A81705050A0032169E /* CDVTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E14B5A61705050A0032169E /* CDVTimer.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7E14B5A91705050A0032169E /* CDVTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E14B5A71705050A0032169E /* CDVTimer.m */; };
+		7E5D94151AB23DB400F4D9EB /* CDVPlugin+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E5D94141AB23DB400F4D9EB /* CDVPlugin+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
 		8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -68,7 +68,6 @@
 		306ADAE31AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+CordovaPreferences.h"; path = "Classes/NSDictionary+CordovaPreferences.h"; sourceTree = "<group>"; };
 		306ADAE41AAA73E100CAC885 /* NSDictionary+CordovaPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+CordovaPreferences.m"; path = "Classes/NSDictionary+CordovaPreferences.m"; sourceTree = "<group>"; };
 		3073E9EC1656D51200957977 /* CDVScreenOrientationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVScreenOrientationDelegate.h; path = Classes/CDVScreenOrientationDelegate.h; sourceTree = "<group>"; };
-		30B7A65B1A0B73AF0010C630 /* NSDictionary+CordovaPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+CordovaPreferences.m"; path = "Classes/NSDictionary+CordovaPreferences.m"; sourceTree = "<group>"; };
 		30C6847E1406CB38004C1A8E /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWhitelist.h; path = Classes/CDVWhitelist.h; sourceTree = "<group>"; };
 		30C6847F1406CB38004C1A8E /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVWhitelist.m; path = Classes/CDVWhitelist.m; sourceTree = "<group>"; };
 		30C684921407044A004C1A8E /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVURLProtocol.h; path = Classes/CDVURLProtocol.h; sourceTree = "<group>"; };
@@ -81,6 +80,7 @@
 		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		7E14B5A61705050A0032169E /* CDVTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVTimer.h; path = Classes/CDVTimer.h; sourceTree = "<group>"; };
 		7E14B5A71705050A0032169E /* CDVTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVTimer.m; path = Classes/CDVTimer.m; sourceTree = "<group>"; };
+		7E5D94141AB23DB400F4D9EB /* CDVPlugin+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CDVPlugin+Private.h"; path = "Classes/CDVPlugin+Private.h"; sourceTree = "<group>"; };
 		8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
 		8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
 		8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVInvokedUrlCommand.h; path = Classes/CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
@@ -188,6 +188,7 @@
 				EB6A98521A77EE470013FCDB /* CDVJSON_private.m */,
 				EB6A98531A77EE470013FCDB /* CDVJSON_private.h */,
 				AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */,
+				7E5D94141AB23DB400F4D9EB /* CDVPlugin+Private.h */,
 			);
 			name = Private;
 			sourceTree = "<group>";
@@ -218,6 +219,7 @@
 				306ADAE61AAA73E100CAC885 /* CDVWebViewEngineProtocol.h in Headers */,
 				EB96673B16A8970A00D86CDF /* CDVUserAgentUtil.h in Headers */,
 				306ADAEA1AAA745400CAC885 /* CDVCommandQueue.h in Headers */,
+				7E5D94151AB23DB400F4D9EB /* CDVPlugin+Private.h in Headers */,
 				EB6A98571A77FA430013FCDB /* NSData+Base64.h in Headers */,
 				306ADAEB1AAA747100CAC885 /* NSMutableArray+QueueAdditions.h in Headers */,
 				306ADAEC1AAA753300CAC885 /* CDVCommandDelegateImpl.h in Headers */,
@@ -283,7 +285,6 @@
 				8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */,
 				306ADAE81AAA73E100CAC885 /* NSDictionary+CordovaPreferences.m in Sources */,
 				1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */,
-				30B7A65D1A0B73AF0010C630 /* NSDictionary+CordovaPreferences.m in Sources */,
 				30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */,
 				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
 				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[24/50] [abbrv] ios commit: CB-5520 - Remove all frameworks specified in the templates. Rely on implicit Clang Module loading.

Posted by ia...@apache.org.
CB-5520 - Remove all frameworks specified in the templates. Rely on implicit Clang Module loading.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/1a44a4ee
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/1a44a4ee
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/1a44a4ee

Branch: refs/heads/unplug-whitelist
Commit: 1a44a4eed9f22024cc0480733a4c21af63f92ab5
Parents: 2a54fc1
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Mar 17 01:04:35 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Mar 17 01:04:35 2015 -0700

----------------------------------------------------------------------
 bin/templates/project/__CLI__.xcodeproj/project.pbxproj | 11 -----------
 .../project/__NON-CLI__.xcodeproj/project.pbxproj       | 12 ------------
 bin/templates/scripts/cordova/build.xcconfig            |  2 +-
 3 files changed, 1 insertion(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1a44a4ee/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
index dcc561b..4633168 100755
--- a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
@@ -9,14 +9,12 @@
 /* Begin PBXBuildFile section */
 		1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; };
 		1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
-		288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
 		301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; };
 		302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; };
 		302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; };
 		3047A5121AB8059700498E2A /* build-debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; };
 		3047A5131AB8059700498E2A /* build-release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A5101AB8059700498E2A /* build-release.xcconfig */; };
 		3047A5141AB8059700498E2A /* build.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A5111AB8059700498E2A /* build.xcconfig */; };
-		305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */; };
 		3088BBBD154F3926009F9C59 /* Default-Landscape@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */; };
 		3088BBBE154F3926009F9C59 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */; };
 		3088BBBF154F3926009F9C59 /* Default-Portrait@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */; };
@@ -31,7 +29,6 @@
 		30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */; };
 		30C1856619D5FC0A00212699 /* icon-60@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30C1856519D5FC0A00212699 /* icon-60@3x.png */; };
 		30FC414916E50CA1004E6F35 /* icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30FC414816E50CA1004E6F35 /* icon-72@2x.png */; };
-		5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */; };
 		7E7966DE1810823500FA85AD /* icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D41810823500FA85AD /* icon-40.png */; };
 		7E7966DF1810823500FA85AD /* icon-40@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D51810823500FA85AD /* icon-40@2x.png */; };
 		7E7966E01810823500FA85AD /* icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D61810823500FA85AD /* icon-50.png */; };
@@ -78,7 +75,6 @@
 		3047A50F1AB8059700498E2A /* build-debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-debug.xcconfig"; path = cordova/build-debug.xcconfig; sourceTree = SOURCE_ROOT; };
 		3047A5101AB8059700498E2A /* build-release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-release.xcconfig"; path = cordova/build-release.xcconfig; sourceTree = SOURCE_ROOT; };
 		3047A5111AB8059700498E2A /* build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = build.xcconfig; path = cordova/build.xcconfig; sourceTree = SOURCE_ROOT; };
-		305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
 		3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape@2x~ipad.png"; sourceTree = "<group>"; };
 		3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape~ipad.png"; sourceTree = "<group>"; };
 		3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait@2x~ipad.png"; sourceTree = "<group>"; };
@@ -94,7 +90,6 @@
 		30C1856519D5FC0A00212699 /* icon-60@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-60@3x.png"; sourceTree = "<group>"; };
 		30FC414816E50CA1004E6F35 /* icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-72@2x.png"; sourceTree = "<group>"; };
 		32CA4F630368D1EE00C91783 /* __PROJECT_NAME__-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "__PROJECT_NAME__-Prefix.pch"; sourceTree = "<group>"; };
-		5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
 		7E7966D41810823500FA85AD /* icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40.png"; sourceTree = "<group>"; };
 		7E7966D51810823500FA85AD /* icon-40@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40@2x.png"; sourceTree = "<group>"; };
 		7E7966D61810823500FA85AD /* icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-50.png"; sourceTree = "<group>"; };
@@ -119,10 +114,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */,
 				301BF552109A68D80062928A /* libCordova.a in Frameworks */,
-				288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */,
-				305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -194,9 +186,6 @@
 		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
-				5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */,
-				288765FC0DF74451002DB57D /* CoreGraphics.framework */,
-				305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */,
 			);
 			name = Frameworks;
 			sourceTree = "<group>";

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1a44a4ee/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
index b1f6491..98f84a0 100755
--- a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
@@ -9,11 +9,9 @@
 /* Begin PBXBuildFile section */
 		1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; };
 		1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
-		288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
 		301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; };
 		302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; };
 		302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; };
-		305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */; };
 		3074132519D5FC77000C6D87 /* icon-60@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3074132419D5FC77000C6D87 /* icon-60@3x.png */; };
 		30761BD21AB7FCF100D046E3 /* build-debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 30761BCF1AB7FCF100D046E3 /* build-debug.xcconfig */; };
 		30761BD31AB7FCF100D046E3 /* build-release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 30761BD01AB7FCF100D046E3 /* build-release.xcconfig */; };
@@ -31,7 +29,6 @@
 		30B4F30819D5E08600D9F7D8 /* Default-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F30519D5E08600D9F7D8 /* Default-736h.png */; };
 		30B4F30919D5E08600D9F7D8 /* Default-Landscape-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F30619D5E08600D9F7D8 /* Default-Landscape-736h.png */; };
 		30FC414916E50CA1004E6F35 /* icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30FC414816E50CA1004E6F35 /* icon-72@2x.png */; };
-		5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */; };
 		7E7966DE1810823500FA85AD /* icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D41810823500FA85AD /* icon-40.png */; };
 		7E7966DF1810823500FA85AD /* icon-40@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D51810823500FA85AD /* icon-40@2x.png */; };
 		7E7966E01810823500FA85AD /* icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D61810823500FA85AD /* icon-50.png */; };
@@ -66,14 +63,12 @@
 		1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
 		1D6058910D05DD3D006BFB54 /* __PROJECT_NAME__.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "__PROJECT_NAME__.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-		288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
 		29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = CordovaLib.xcodeproj; sourceTree = CORDOVALIB; };
 		301BF56E109A69640062928A /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = SOURCE_ROOT; };
 		302D95EE14D2391D003F00A1 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
 		302D95EF14D2391D003F00A1 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
 		302D95F014D2391D003F00A1 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = "<group>"; };
-		305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
 		3074132419D5FC77000C6D87 /* icon-60@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-60@3x.png"; sourceTree = "<group>"; };
 		30761BCF1AB7FCF100D046E3 /* build-debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-debug.xcconfig"; path = "cordova/build-debug.xcconfig"; sourceTree = SOURCE_ROOT; };
 		30761BD01AB7FCF100D046E3 /* build-release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-release.xcconfig"; path = "cordova/build-release.xcconfig"; sourceTree = SOURCE_ROOT; };
@@ -92,7 +87,6 @@
 		30B4F30619D5E08600D9F7D8 /* Default-Landscape-736h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape-736h.png"; sourceTree = "<group>"; };
 		30FC414816E50CA1004E6F35 /* icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-72@2x.png"; sourceTree = "<group>"; };
 		32CA4F630368D1EE00C91783 /* __PROJECT_NAME__-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "__PROJECT_NAME__-Prefix.pch"; sourceTree = "<group>"; };
-		5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
 		7E7966D41810823500FA85AD /* icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40.png"; sourceTree = "<group>"; };
 		7E7966D51810823500FA85AD /* icon-40@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40@2x.png"; sourceTree = "<group>"; };
 		7E7966D61810823500FA85AD /* icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-50.png"; sourceTree = "<group>"; };
@@ -114,10 +108,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */,
 				301BF552109A68D80062928A /* libCordova.a in Frameworks */,
-				288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */,
-				305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -187,9 +178,6 @@
 		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
-				5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */,
-				288765FC0DF74451002DB57D /* CoreGraphics.framework */,
-				305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */,
 			);
 			name = Frameworks;
 			sourceTree = "<group>";

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1a44a4ee/bin/templates/scripts/cordova/build.xcconfig
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/build.xcconfig b/bin/templates/scripts/cordova/build.xcconfig
index a7642ad..441376d 100644
--- a/bin/templates/scripts/cordova/build.xcconfig
+++ b/bin/templates/scripts/cordova/build.xcconfig
@@ -24,7 +24,7 @@
 
 HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include $(OBJROOT)/UninstalledProducts/include $(BUILT_PRODUCTS_DIR)"
 IPHONEOS_DEPLOYMENT_TARGET = 7.0
-OTHER_LDFLAGS = -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -ObjC
+OTHER_LDFLAGS = -ObjC
 TARGETED_DEVICE_FAMILY = 1,2
                 
 // Type of signing identity used for codesigning, resolves to first match of given type.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[08/50] [abbrv] ios commit: Moved NSDictionary+CordovaPreferences header from Private to Public

Posted by ia...@apache.org.
Moved NSDictionary+CordovaPreferences header from Private to Public


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/2a64bbfe
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/2a64bbfe
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/2a64bbfe

Branch: refs/heads/unplug-whitelist
Commit: 2a64bbfecaee4a3df944b593187b50c2c68a9c62
Parents: 2eea139
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Mar 12 17:40:31 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Mar 12 17:40:31 2015 -0700

----------------------------------------------------------------------
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2a64bbfe/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index 0c757d6..0b3e4e0 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -17,7 +17,7 @@
 		306ADAE01AAA73BA00CAC885 /* CDVHandleOpenURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 306ADADE1AAA73A800CAC885 /* CDVHandleOpenURL.m */; };
 		306ADAE51AAA73E100CAC885 /* CDVUIWebViewEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 306ADAE11AAA73E100CAC885 /* CDVUIWebViewEngine.m */; };
 		306ADAE61AAA73E100CAC885 /* CDVWebViewEngineProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 306ADAE21AAA73E100CAC885 /* CDVWebViewEngineProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		306ADAE71AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 306ADAE31AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h */; };
+		306ADAE71AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 306ADAE31AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		306ADAE81AAA73E100CAC885 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 306ADAE41AAA73E100CAC885 /* NSDictionary+CordovaPreferences.m */; };
 		306ADAEA1AAA745400CAC885 /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		306ADAEB1AAA747100CAC885 /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -211,7 +211,6 @@
 				EB6A98401A729CD70013FCDB /* CDVAvailabilityDeprecated.h in Headers */,
 				30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */,
 				1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */,
-				306ADAE71AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h in Headers */,
 				8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */,
 				30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */,
 				30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
@@ -227,6 +226,7 @@
 				306ADAEA1AAA745400CAC885 /* CDVCommandQueue.h in Headers */,
 				7E5D94181AB250F800F4D9EB /* CDVAppDelegate.h in Headers */,
 				7E5D94151AB23DB400F4D9EB /* CDVPlugin+Private.h in Headers */,
+				306ADAE71AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h in Headers */,
 				EB6A98571A77FA430013FCDB /* NSData+Base64.h in Headers */,
 				306ADAEB1AAA747100CAC885 /* NSMutableArray+QueueAdditions.h in Headers */,
 				306ADAEC1AAA753300CAC885 /* CDVCommandDelegateImpl.h in Headers */,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[12/50] [abbrv] ios commit: Update version to 4.0.0 in CDVAvailability.h

Posted by ia...@apache.org.
Update version to 4.0.0 in CDVAvailability.h


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/e9e3265b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/e9e3265b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/e9e3265b

Branch: refs/heads/unplug-whitelist
Commit: e9e3265bdd4004ce3b83ec49035dc5bf8b9019c4
Parents: 9bf4363
Author: Shazron Abdullah <sh...@gmail.com>
Authored: Fri Mar 13 18:48:08 2015 -0700
Committer: Shazron Abdullah <sh...@gmail.com>
Committed: Fri Mar 13 18:48:08 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVAvailability.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/e9e3265b/CordovaLib/Classes/CDVAvailability.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAvailability.h b/CordovaLib/Classes/CDVAvailability.h
index 5c5430f..41b3457 100644
--- a/CordovaLib/Classes/CDVAvailability.h
+++ b/CordovaLib/Classes/CDVAvailability.h
@@ -55,6 +55,7 @@
 #define __CORDOVA_3_6_0 30600
 #define __CORDOVA_3_7_0 30700
 #define __CORDOVA_3_8_0 30800
+#define __CORDOVA_4_0_0 40000
 #define __CORDOVA_NA 99999      /* not available */
 
 /*
@@ -65,7 +66,7 @@
  #endif
  */
 #ifndef CORDOVA_VERSION_MIN_REQUIRED
-    #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_3_8_0
+    #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_4_0_0
 #endif
 
 /*


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[30/50] [abbrv] ios commit: CB-8690 - Group files into folders in CordovaLib/Classes

Posted by ia...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h b/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h
new file mode 100644
index 0000000..993e0a2
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h
@@ -0,0 +1,52 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface CDVInvokedUrlCommand : NSObject {
+    NSString* _callbackId;
+    NSString* _className;
+    NSString* _methodName;
+    NSArray* _arguments;
+}
+
+@property (nonatomic, readonly) NSArray* arguments;
+@property (nonatomic, readonly) NSString* callbackId;
+@property (nonatomic, readonly) NSString* className;
+@property (nonatomic, readonly) NSString* methodName;
+
++ (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry;
+
+- (id)initWithArguments:(NSArray*)arguments
+             callbackId:(NSString*)callbackId
+              className:(NSString*)className
+             methodName:(NSString*)methodName;
+
+- (id)initFromJson:(NSArray*)jsonEntry;
+
+// Returns the argument at the given index.
+// If index >= the number of arguments, returns nil.
+// If the argument at the given index is NSNull, returns nil.
+- (id)argumentAtIndex:(NSUInteger)index;
+// Same as above, but returns defaultValue instead of nil.
+- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue;
+// Same as above, but returns defaultValue instead of nil, and if the argument is not of the expected class, returns defaultValue
+- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m b/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m
new file mode 100644
index 0000000..3a5e8e7
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m
@@ -0,0 +1,117 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVInvokedUrlCommand.h"
+#import "CDVJSON_private.h"
+#import "NSData+Base64.h"
+
+@implementation CDVInvokedUrlCommand
+
+@synthesize arguments = _arguments;
+@synthesize callbackId = _callbackId;
+@synthesize className = _className;
+@synthesize methodName = _methodName;
+
++ (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry
+{
+    return [[CDVInvokedUrlCommand alloc] initFromJson:jsonEntry];
+}
+
+- (id)initFromJson:(NSArray*)jsonEntry
+{
+    id tmp = [jsonEntry objectAtIndex:0];
+    NSString* callbackId = tmp == [NSNull null] ? nil : tmp;
+    NSString* className = [jsonEntry objectAtIndex:1];
+    NSString* methodName = [jsonEntry objectAtIndex:2];
+    NSMutableArray* arguments = [jsonEntry objectAtIndex:3];
+
+    return [self initWithArguments:arguments
+                        callbackId:callbackId
+                         className:className
+                        methodName:methodName];
+}
+
+- (id)initWithArguments:(NSArray*)arguments
+             callbackId:(NSString*)callbackId
+              className:(NSString*)className
+             methodName:(NSString*)methodName
+{
+    self = [super init];
+    if (self != nil) {
+        _arguments = arguments;
+        _callbackId = callbackId;
+        _className = className;
+        _methodName = methodName;
+    }
+    [self massageArguments];
+    return self;
+}
+
+- (void)massageArguments
+{
+    NSMutableArray* newArgs = nil;
+
+    for (NSUInteger i = 0, count = [_arguments count]; i < count; ++i) {
+        id arg = [_arguments objectAtIndex:i];
+        if (![arg isKindOfClass:[NSDictionary class]]) {
+            continue;
+        }
+        NSDictionary* dict = arg;
+        NSString* type = [dict objectForKey:@"CDVType"];
+        if (!type || ![type isEqualToString:@"ArrayBuffer"]) {
+            continue;
+        }
+        NSString* data = [dict objectForKey:@"data"];
+        if (!data) {
+            continue;
+        }
+        if (newArgs == nil) {
+            newArgs = [NSMutableArray arrayWithArray:_arguments];
+            _arguments = newArgs;
+        }
+        [newArgs replaceObjectAtIndex:i withObject:[NSData cdv_dataFromBase64String:data]];
+    }
+}
+
+- (id)argumentAtIndex:(NSUInteger)index
+{
+    return [self argumentAtIndex:index withDefault:nil];
+}
+
+- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue
+{
+    return [self argumentAtIndex:index withDefault:defaultValue andClass:nil];
+}
+
+- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass
+{
+    if (index >= [_arguments count]) {
+        return defaultValue;
+    }
+    id ret = [_arguments objectAtIndex:index];
+    if (ret == [NSNull null]) {
+        ret = defaultValue;
+    }
+    if ((aClass != nil) && ![ret isKindOfClass:aClass]) {
+        ret = defaultValue;
+    }
+    return ret;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVPlugin+Resources.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVPlugin+Resources.h b/CordovaLib/Classes/Public/CDVPlugin+Resources.h
new file mode 100644
index 0000000..cc43b16
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVPlugin+Resources.h
@@ -0,0 +1,39 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <UIKit/UIKit.h>
+#import "CDVPlugin.h"
+
+@interface CDVPlugin (CDVPluginResources)
+
+/*
+ This will return the localized string for a key in a .bundle that is named the same as your class
+ For example, if your plugin class was called Foo, and you have a Spanish localized strings file, it will
+ try to load the desired key from Foo.bundle/es.lproj/Localizable.strings
+ */
+- (NSString*)pluginLocalizedString:(NSString*)key;
+
+/*
+ This will return the image for a name in a .bundle that is named the same as your class
+ For example, if your plugin class was called Foo, and you have an image called "bar",
+ it will try to load the image from Foo.bundle/bar.png (and appropriately named retina versions)
+ */
+- (UIImage*)pluginImageResource:(NSString*)name;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVPlugin+Resources.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVPlugin+Resources.m b/CordovaLib/Classes/Public/CDVPlugin+Resources.m
new file mode 100644
index 0000000..5690738
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVPlugin+Resources.m
@@ -0,0 +1,38 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVPlugin+Resources.h"
+
+@implementation CDVPlugin (CDVPluginResources)
+
+- (NSString*)pluginLocalizedString:(NSString*)key
+{
+    NSBundle* bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:NSStringFromClass([self class]) ofType:@"bundle"]];
+
+    return [bundle localizedStringForKey:(key) value:nil table:nil];
+}
+
+- (UIImage*)pluginImageResource:(NSString*)name
+{
+    NSString* resourceIdentifier = [NSString stringWithFormat:@"%@.bundle/%@", NSStringFromClass([self class]), name];
+
+    return [UIImage imageNamed:resourceIdentifier];
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVPlugin.h b/CordovaLib/Classes/Public/CDVPlugin.h
new file mode 100644
index 0000000..54c8afd
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVPlugin.h
@@ -0,0 +1,69 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+#import "CDVPluginResult.h"
+#import "NSMutableArray+QueueAdditions.h"
+#import "CDVCommandDelegate.h"
+#import "CDVWebViewEngineProtocol.h"
+
+@interface UIView (org_apache_cordova_UIView_Extension)
+
+@property (nonatomic, weak) UIScrollView* scrollView;
+
+@end
+
+extern NSString* const CDVPageDidLoadNotification;
+extern NSString* const CDVPluginHandleOpenURLNotification;
+extern NSString* const CDVPluginResetNotification;
+extern NSString* const CDVLocalNotification;
+extern NSString* const CDVRemoteNotification;
+extern NSString* const CDVRemoteNotificationError;
+
+@interface CDVPlugin : NSObject {}
+
+@property (nonatomic, readonly, weak) UIView* webView;
+@property (nonatomic, readonly, weak) id <CDVWebViewEngineProtocol> webViewEngine;
+
+@property (nonatomic, weak) UIViewController* viewController;
+@property (nonatomic, weak) id <CDVCommandDelegate> commandDelegate;
+
+@property (readonly, assign) BOOL hasPendingOperation;
+
+- (void)pluginInitialize;
+
+- (void)handleOpenURL:(NSNotification*)notification;
+- (void)onAppTerminate;
+- (void)onMemoryWarning;
+- (void)onReset;
+- (void)dispose;
+
+/*
+ // see initWithWebView implementation
+ - (void) onPause {}
+ - (void) onResume {}
+ - (void) onOrientationWillChange {}
+ - (void) onOrientationDidChange {}
+ - (void)didReceiveLocalNotification:(NSNotification *)notification;
+ */
+
+- (id)appDelegate;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVPlugin.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVPlugin.m b/CordovaLib/Classes/Public/CDVPlugin.m
new file mode 100644
index 0000000..ac3a8ee
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVPlugin.m
@@ -0,0 +1,163 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVPlugin.h"
+#import "CDVPlugin+Private.h"
+#import "CDVPlugin+Resources.h"
+#import "CDVViewController.h"
+#include <objc/message.h>
+
+@implementation UIView (org_apache_cordova_UIView_Extension)
+
+@dynamic scrollView;
+
+- (UIScrollView*)scrollView
+{
+    SEL scrollViewSelector = NSSelectorFromString(@"scrollView");
+
+    if ([self respondsToSelector:scrollViewSelector]) {
+        return ((id (*)(id, SEL))objc_msgSend)(self, scrollViewSelector);
+    }
+
+    return nil;
+}
+
+@end
+
+NSString* const CDVPageDidLoadNotification = @"CDVPageDidLoadNotification";
+NSString* const CDVPluginHandleOpenURLNotification = @"CDVPluginHandleOpenURLNotification";
+NSString* const CDVPluginResetNotification = @"CDVPluginResetNotification";
+NSString* const CDVLocalNotification = @"CDVLocalNotification";
+NSString* const CDVRemoteNotification = @"CDVRemoteNotification";
+NSString* const CDVRemoteNotificationError = @"CDVRemoteNotificationError";
+
+@interface CDVPlugin ()
+
+@property (readwrite, assign) BOOL hasPendingOperation;
+@property (nonatomic, readwrite, weak) id <CDVWebViewEngineProtocol> webViewEngine;
+
+@end
+
+@implementation CDVPlugin
+@synthesize webViewEngine, viewController, commandDelegate, hasPendingOperation;
+@dynamic webView;
+
+// Do not override these methods. Use pluginInitialize instead.
+- (instancetype)initWithWebViewEngine:(id <CDVWebViewEngineProtocol>)theWebViewEngine
+{
+    self = [super init];
+    if (self) {
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppTerminate) name:UIApplicationWillTerminateNotification object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onMemoryWarning) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleOpenURL:) name:CDVPluginHandleOpenURLNotification object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onReset) name:CDVPluginResetNotification object:theWebViewEngine.engineWebView];
+
+        self.webViewEngine = theWebViewEngine;
+    }
+    return self;
+}
+
+- (void)pluginInitialize
+{
+    // You can listen to more app notifications, see:
+    // http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006728-CH3-DontLinkElementID_4
+
+    // NOTE: if you want to use these, make sure you uncomment the corresponding notification handler
+
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil];
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil];
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationWillChange) name:UIApplicationWillChangeStatusBarOrientationNotification object:nil];
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationDidChange) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
+
+    // Added in 2.3.0
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveLocalNotification:) name:CDVLocalNotification object:nil];
+
+    // Added in 2.5.0
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad:) name:CDVPageDidLoadNotification object:self.webView];
+}
+
+- (void)dispose
+{
+    viewController = nil;
+    commandDelegate = nil;
+}
+
+- (UIView*)webView
+{
+    if (self.webViewEngine != nil) {
+        return self.webViewEngine.engineWebView;
+    }
+
+    return nil;
+}
+
+/*
+// NOTE: for onPause and onResume, calls into JavaScript must not call or trigger any blocking UI, like alerts
+- (void) onPause {}
+- (void) onResume {}
+- (void) onOrientationWillChange {}
+- (void) onOrientationDidChange {}
+*/
+
+/* NOTE: calls into JavaScript must not call or trigger any blocking UI, like alerts */
+- (void)handleOpenURL:(NSNotification*)notification
+{
+    // override to handle urls sent to your app
+    // register your url schemes in your App-Info.plist
+
+    NSURL* url = [notification object];
+
+    if ([url isKindOfClass:[NSURL class]]) {
+        /* Do your thing! */
+    }
+}
+
+/* NOTE: calls into JavaScript must not call or trigger any blocking UI, like alerts */
+- (void)onAppTerminate
+{
+    // override this if you need to do any cleanup on app exit
+}
+
+- (void)onMemoryWarning
+{
+    // override to remove caches, etc
+}
+
+- (void)onReset
+{
+    // Override to cancel any long-running requests when the WebView navigates or refreshes.
+}
+
+- (void)dealloc
+{
+    [[NSNotificationCenter defaultCenter] removeObserver:self];   // this will remove all notification unless added using addObserverForName:object:queue:usingBlock:
+}
+
+- (id)appDelegate
+{
+    return [[UIApplication sharedApplication] delegate];
+}
+
+// default implementation does nothing, ideally, we are not registered for notification if we aren't going to do anything.
+// - (void)didReceiveLocalNotification:(NSNotification *)notification
+// {
+//    // UILocalNotification* localNotification = [notification object]; // get the payload as a LocalNotification
+// }
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVPluginResult.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVPluginResult.h b/CordovaLib/Classes/Public/CDVPluginResult.h
new file mode 100644
index 0000000..7377b12
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVPluginResult.h
@@ -0,0 +1,64 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CDVAvailability.h"
+
+typedef enum {
+    CDVCommandStatus_NO_RESULT = 0,
+    CDVCommandStatus_OK,
+    CDVCommandStatus_CLASS_NOT_FOUND_EXCEPTION,
+    CDVCommandStatus_ILLEGAL_ACCESS_EXCEPTION,
+    CDVCommandStatus_INSTANTIATION_EXCEPTION,
+    CDVCommandStatus_MALFORMED_URL_EXCEPTION,
+    CDVCommandStatus_IO_EXCEPTION,
+    CDVCommandStatus_INVALID_ACTION,
+    CDVCommandStatus_JSON_EXCEPTION,
+    CDVCommandStatus_ERROR
+} CDVCommandStatus;
+
+@interface CDVPluginResult : NSObject {}
+
+@property (nonatomic, strong, readonly) NSNumber* status;
+@property (nonatomic, strong, readonly) id message;
+@property (nonatomic, strong)           NSNumber* keepCallback;
+// This property can be used to scope the lifetime of another object. For example,
+// Use it to store the associated NSData when `message` is created using initWithBytesNoCopy.
+@property (nonatomic, strong) id associatedObject;
+
+- (CDVPluginResult*)init;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode;
+
++ (void)setVerbose:(BOOL)verbose;
++ (BOOL)isVerbose;
+
+- (void)setKeepCallbackAsBool:(BOOL)bKeepCallback;
+
+- (NSString*)argumentsAsJSON;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVPluginResult.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVPluginResult.m b/CordovaLib/Classes/Public/CDVPluginResult.m
new file mode 100644
index 0000000..f200c04
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVPluginResult.m
@@ -0,0 +1,177 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVPluginResult.h"
+#import "CDVJSON_private.h"
+#import "CDVDebug.h"
+#import "NSData+Base64.h"
+
+@interface CDVPluginResult ()
+
+- (CDVPluginResult*)initWithStatus:(CDVCommandStatus)statusOrdinal message:(id)theMessage;
+
+@end
+
+@implementation CDVPluginResult
+@synthesize status, message, keepCallback, associatedObject;
+
+static NSArray* org_apache_cordova_CommandStatusMsgs;
+
+id messageFromArrayBuffer(NSData* data)
+{
+    return @{
+               @"CDVType" : @"ArrayBuffer",
+               @"data" :[data cdv_base64EncodedString]
+    };
+}
+
+id massageMessage(id message)
+{
+    if ([message isKindOfClass:[NSData class]]) {
+        return messageFromArrayBuffer(message);
+    }
+    return message;
+}
+
+id messageFromMultipart(NSArray* theMessages)
+{
+    NSMutableArray* messages = [NSMutableArray arrayWithArray:theMessages];
+
+    for (NSUInteger i = 0; i < messages.count; ++i) {
+        [messages replaceObjectAtIndex:i withObject:massageMessage([messages objectAtIndex:i])];
+    }
+
+    return @{
+               @"CDVType" : @"MultiPart",
+               @"messages" : messages
+    };
+}
+
++ (void)initialize
+{
+    org_apache_cordova_CommandStatusMsgs = [[NSArray alloc] initWithObjects:@"No result",
+        @"OK",
+        @"Class not found",
+        @"Illegal access",
+        @"Instantiation error",
+        @"Malformed url",
+        @"IO error",
+        @"Invalid action",
+        @"JSON error",
+        @"Error",
+        nil];
+}
+
+- (CDVPluginResult*)init
+{
+    return [self initWithStatus:CDVCommandStatus_NO_RESULT message:nil];
+}
+
+- (CDVPluginResult*)initWithStatus:(CDVCommandStatus)statusOrdinal message:(id)theMessage
+{
+    self = [super init];
+    if (self) {
+        status = [NSNumber numberWithInt:statusOrdinal];
+        message = theMessage;
+        keepCallback = [NSNumber numberWithBool:NO];
+    }
+    return self;
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:nil];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithInt:theMessage]];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithDouble:theMessage]];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithBool:theMessage]];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:messageFromArrayBuffer(theMessage)];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:messageFromMultipart(theMessages)];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode
+{
+    NSDictionary* errDict = @{@"code" :[NSNumber numberWithInt:errorCode]};
+
+    return [[self alloc] initWithStatus:statusOrdinal message:errDict];
+}
+
+- (void)setKeepCallbackAsBool:(BOOL)bKeepCallback
+{
+    [self setKeepCallback:[NSNumber numberWithBool:bKeepCallback]];
+}
+
+- (NSString*)argumentsAsJSON
+{
+    id arguments = (self.message == nil ? [NSNull null] : self.message);
+    NSArray* argumentsWrappedInArray = [NSArray arrayWithObject:arguments];
+
+    NSString* argumentsJSON = [argumentsWrappedInArray cdv_JSONString];
+
+    argumentsJSON = [argumentsJSON substringWithRange:NSMakeRange(1, [argumentsJSON length] - 2)];
+
+    return argumentsJSON;
+}
+
+static BOOL gIsVerbose = NO;
++ (void)setVerbose:(BOOL)verbose
+{
+    gIsVerbose = verbose;
+}
+
++ (BOOL)isVerbose
+{
+    return gIsVerbose;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h b/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h
new file mode 100644
index 0000000..7226205
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h
@@ -0,0 +1,28 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@protocol CDVScreenOrientationDelegate <NSObject>
+
+- (NSUInteger)supportedInterfaceOrientations;
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
+- (BOOL)shouldAutorotate;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVTimer.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVTimer.h b/CordovaLib/Classes/Public/CDVTimer.h
new file mode 100644
index 0000000..6d31593
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVTimer.h
@@ -0,0 +1,27 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface CDVTimer : NSObject
+
++ (void)start:(NSString*)name;
++ (void)stop:(NSString*)name;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVTimer.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVTimer.m b/CordovaLib/Classes/Public/CDVTimer.m
new file mode 100644
index 0000000..784e94d
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVTimer.m
@@ -0,0 +1,123 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVTimer.h"
+
+#pragma mark CDVTimerItem
+
+@interface CDVTimerItem : NSObject
+
+@property (nonatomic, strong) NSString* name;
+@property (nonatomic, strong) NSDate* started;
+@property (nonatomic, strong) NSDate* ended;
+
+- (void)log;
+
+@end
+
+@implementation CDVTimerItem
+
+- (void)log
+{
+    NSLog(@"[CDVTimer][%@] %fms", self.name, [self.ended timeIntervalSinceDate:self.started] * 1000.0);
+}
+
+@end
+
+#pragma mark CDVTimer
+
+@interface CDVTimer ()
+
+@property (nonatomic, strong) NSMutableDictionary* items;
+
+@end
+
+@implementation CDVTimer
+
+#pragma mark object methods
+
+- (id)init
+{
+    if (self = [super init]) {
+        self.items = [NSMutableDictionary dictionaryWithCapacity:6];
+    }
+
+    return self;
+}
+
+- (void)add:(NSString*)name
+{
+    if ([self.items objectForKey:[name lowercaseString]] == nil) {
+        CDVTimerItem* item = [CDVTimerItem new];
+        item.name = name;
+        item.started = [NSDate new];
+        [self.items setObject:item forKey:[name lowercaseString]];
+    } else {
+        NSLog(@"Timer called '%@' already exists.", name);
+    }
+}
+
+- (void)remove:(NSString*)name
+{
+    CDVTimerItem* item = [self.items objectForKey:[name lowercaseString]];
+
+    if (item != nil) {
+        item.ended = [NSDate new];
+        [item log];
+        [self.items removeObjectForKey:[name lowercaseString]];
+    } else {
+        NSLog(@"Timer called '%@' does not exist.", name);
+    }
+}
+
+- (void)removeAll
+{
+    [self.items removeAllObjects];
+}
+
+#pragma mark class methods
+
++ (void)start:(NSString*)name
+{
+    [[CDVTimer sharedInstance] add:name];
+}
+
++ (void)stop:(NSString*)name
+{
+    [[CDVTimer sharedInstance] remove:name];
+}
+
++ (void)clearAll
+{
+    [[CDVTimer sharedInstance] removeAll];
+}
+
++ (CDVTimer*)sharedInstance
+{
+    static dispatch_once_t pred = 0;
+    __strong static CDVTimer* _sharedObject = nil;
+
+    dispatch_once(&pred, ^{
+            _sharedObject = [[self alloc] init];
+        });
+
+    return _sharedObject;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVURLProtocol.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVURLProtocol.h b/CordovaLib/Classes/Public/CDVURLProtocol.h
new file mode 100644
index 0000000..5444f6d
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVURLProtocol.h
@@ -0,0 +1,29 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CDVAvailability.h"
+
+@class CDVViewController;
+
+@interface CDVURLProtocol : NSURLProtocol {}
+
++ (void)registerViewController:(CDVViewController*)viewController;
++ (void)unregisterViewController:(CDVViewController*)viewController;
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVURLProtocol.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVURLProtocol.m b/CordovaLib/Classes/Public/CDVURLProtocol.m
new file mode 100644
index 0000000..fce5783
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVURLProtocol.m
@@ -0,0 +1,213 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <AssetsLibrary/ALAsset.h>
+#import <AssetsLibrary/ALAssetRepresentation.h>
+#import <AssetsLibrary/ALAssetsLibrary.h>
+#import <MobileCoreServices/MobileCoreServices.h>
+#import "CDVURLProtocol.h"
+#import "CDVCommandQueue.h"
+#import "CDVWhitelist.h"
+#import "CDVViewController.h"
+
+static CDVWhitelist* gWhitelist = nil;
+// Contains a set of NSNumbers of addresses of controllers. It doesn't store
+// the actual pointer to avoid retaining.
+static NSMutableSet* gRegisteredControllers = nil;
+
+NSString* const kCDVAssetsLibraryPrefixes = @"assets-library://";
+
+// Returns the registered view controller that sent the given request.
+// If the user-agent is not from a UIWebView, or if it's from an unregistered one,
+// then nil is returned.
+static CDVViewController *viewControllerForRequest(NSURLRequest* request)
+{
+    // The exec bridge explicitly sets the VC address in a header.
+    // This works around the User-Agent not being set for file: URLs.
+    NSString* addrString = [request valueForHTTPHeaderField:@"vc"];
+
+    if (addrString == nil) {
+        NSString* userAgent = [request valueForHTTPHeaderField:@"User-Agent"];
+        if (userAgent == nil) {
+            return nil;
+        }
+        NSUInteger bracketLocation = [userAgent rangeOfString:@"(" options:NSBackwardsSearch].location;
+        if (bracketLocation == NSNotFound) {
+            return nil;
+        }
+        addrString = [userAgent substringFromIndex:bracketLocation + 1];
+    }
+
+    long long viewControllerAddress = [addrString longLongValue];
+    @synchronized(gRegisteredControllers) {
+        if (![gRegisteredControllers containsObject:[NSNumber numberWithLongLong:viewControllerAddress]]) {
+            return nil;
+        }
+    }
+
+    return (__bridge CDVViewController*)(void*)viewControllerAddress;
+}
+
+@implementation CDVURLProtocol
+
++ (void)registerPGHttpURLProtocol {}
+
++ (void)registerURLProtocol {}
+
+// Called to register the URLProtocol, and to make it away of an instance of
+// a ViewController.
++ (void)registerViewController:(CDVViewController*)viewController
+{
+    if (gRegisteredControllers == nil) {
+        [NSURLProtocol registerClass:[CDVURLProtocol class]];
+        gRegisteredControllers = [[NSMutableSet alloc] initWithCapacity:8];
+        // The whitelist doesn't change, so grab the first one and store it.
+        gWhitelist = viewController.whitelist;
+
+        // Note that we grab the whitelist from the first viewcontroller for now - but this will change
+        // when we allow a registered viewcontroller to have its own whitelist (e.g InAppBrowser)
+        // Differentiating the requests will be through the 'vc' http header below as used for the js->objc bridge.
+        //  The 'vc' value is generated by casting the viewcontroller object to a (long long) value (see CDVViewController::webViewDidFinishLoad)
+        if (gWhitelist == nil) {
+            NSLog(@"WARNING: NO whitelist has been set in CDVURLProtocol.");
+        }
+    }
+
+    @synchronized(gRegisteredControllers) {
+        [gRegisteredControllers addObject:[NSNumber numberWithLongLong:(long long)viewController]];
+    }
+}
+
++ (void)unregisterViewController:(CDVViewController*)viewController
+{
+    @synchronized(gRegisteredControllers) {
+        [gRegisteredControllers removeObject:[NSNumber numberWithLongLong:(long long)viewController]];
+    }
+}
+
++ (BOOL)canInitWithRequest:(NSURLRequest*)theRequest
+{
+    NSURL* theUrl = [theRequest URL];
+    CDVViewController* viewController = viewControllerForRequest(theRequest);
+
+    if ([[theUrl absoluteString] hasPrefix:kCDVAssetsLibraryPrefixes]) {
+        return YES;
+    } else if (viewController != nil) {
+        if ([[theUrl path] isEqualToString:@"/!gap_exec"]) {
+            NSString* queuedCommandsJSON = [theRequest valueForHTTPHeaderField:@"cmds"];
+            NSString* requestId = [theRequest valueForHTTPHeaderField:@"rc"];
+            if (requestId == nil) {
+                NSLog(@"!cordova request missing rc header");
+                return NO;
+            }
+            BOOL hasCmds = [queuedCommandsJSON length] > 0;
+            if (hasCmds) {
+                SEL sel = @selector(enqueueCommandBatch:);
+                [viewController.commandQueue performSelectorOnMainThread:sel withObject:queuedCommandsJSON waitUntilDone:NO];
+                [viewController.commandQueue performSelectorOnMainThread:@selector(executePending) withObject:nil waitUntilDone:NO];
+            } else {
+                SEL sel = @selector(processXhrExecBridgePoke:);
+                [viewController.commandQueue performSelectorOnMainThread:sel withObject:[NSNumber numberWithInteger:[requestId integerValue]] waitUntilDone:NO];
+            }
+            // Returning NO here would be 20% faster, but it spams WebInspector's console with failure messages.
+            // If JS->Native bridge speed is really important for an app, they should use the iframe bridge.
+            // Returning YES here causes the request to come through canInitWithRequest two more times.
+            // For this reason, we return NO when cmds exist.
+            return !hasCmds;
+        }
+        // we only care about http and https connections.
+        // CORS takes care of http: trying to access file: URLs.
+        if ([gWhitelist schemeIsAllowed:[theUrl scheme]]) {
+            // if it FAILS the whitelist, we return TRUE, so we can fail the connection later
+            return ![gWhitelist URLIsAllowed:theUrl];
+        }
+    }
+
+    return NO;
+}
+
++ (NSURLRequest*)canonicalRequestForRequest:(NSURLRequest*)request
+{
+    // NSLog(@"%@ received %@", self, NSStringFromSelector(_cmd));
+    return request;
+}
+
+- (void)startLoading
+{
+    // NSLog(@"%@ received %@ - start", self, NSStringFromSelector(_cmd));
+    NSURL* url = [[self request] URL];
+
+    if ([[url path] isEqualToString:@"/!gap_exec"]) {
+        [self sendResponseWithResponseCode:200 data:nil mimeType:nil];
+        return;
+    } else if ([[url absoluteString] hasPrefix:kCDVAssetsLibraryPrefixes]) {
+        ALAssetsLibraryAssetForURLResultBlock resultBlock = ^(ALAsset* asset) {
+            if (asset) {
+                // We have the asset!  Get the data and send it along.
+                ALAssetRepresentation* assetRepresentation = [asset defaultRepresentation];
+                NSString* MIMEType = (__bridge_transfer NSString*)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)[assetRepresentation UTI], kUTTagClassMIMEType);
+                Byte* buffer = (Byte*)malloc((unsigned long)[assetRepresentation size]);
+                NSUInteger bufferSize = [assetRepresentation getBytes:buffer fromOffset:0.0 length:(NSUInteger)[assetRepresentation size] error:nil];
+                NSData* data = [NSData dataWithBytesNoCopy:buffer length:bufferSize freeWhenDone:YES];
+                [self sendResponseWithResponseCode:200 data:data mimeType:MIMEType];
+            } else {
+                // Retrieving the asset failed for some reason.  Send an error.
+                [self sendResponseWithResponseCode:404 data:nil mimeType:nil];
+            }
+        };
+        ALAssetsLibraryAccessFailureBlock failureBlock = ^(NSError* error) {
+            // Retrieving the asset failed for some reason.  Send an error.
+            [self sendResponseWithResponseCode:401 data:nil mimeType:nil];
+        };
+
+        ALAssetsLibrary* assetsLibrary = [[ALAssetsLibrary alloc] init];
+        [assetsLibrary assetForURL:url resultBlock:resultBlock failureBlock:failureBlock];
+        return;
+    }
+
+    NSString* body = [gWhitelist errorStringForURL:url];
+    [self sendResponseWithResponseCode:401 data:[body dataUsingEncoding:NSASCIIStringEncoding] mimeType:nil];
+}
+
+- (void)stopLoading
+{
+    // do any cleanup here
+}
+
++ (BOOL)requestIsCacheEquivalent:(NSURLRequest*)requestA toRequest:(NSURLRequest*)requestB
+{
+    return NO;
+}
+
+- (void)sendResponseWithResponseCode:(NSInteger)statusCode data:(NSData*)data mimeType:(NSString*)mimeType
+{
+    if (mimeType == nil) {
+        mimeType = @"text/plain";
+    }
+
+    NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[[self request] URL] statusCode:statusCode HTTPVersion:@"HTTP/1.1" headerFields:@{@"Content-Type" : mimeType}];
+
+    [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed];
+    if (data != nil) {
+        [[self client] URLProtocol:self didLoadData:data];
+    }
+    [[self client] URLProtocolDidFinishLoading:self];
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVUserAgentUtil.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVUserAgentUtil.h b/CordovaLib/Classes/Public/CDVUserAgentUtil.h
new file mode 100644
index 0000000..4de382f
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVUserAgentUtil.h
@@ -0,0 +1,27 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface CDVUserAgentUtil : NSObject
++ (NSString*)originalUserAgent;
++ (void)acquireLock:(void (^)(NSInteger lockToken))block;
++ (void)releaseLock:(NSInteger*)lockToken;
++ (void)setUserAgent:(NSString*)value lockToken:(NSInteger)lockToken;
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVUserAgentUtil.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVUserAgentUtil.m b/CordovaLib/Classes/Public/CDVUserAgentUtil.m
new file mode 100644
index 0000000..c3402d0
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVUserAgentUtil.m
@@ -0,0 +1,122 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVUserAgentUtil.h"
+
+#import <UIKit/UIKit.h>
+
+// #define VerboseLog NSLog
+#define VerboseLog(...) do {} while (0)
+
+static NSString* const kCdvUserAgentKey = @"Cordova-User-Agent";
+static NSString* const kCdvUserAgentVersionKey = @"Cordova-User-Agent-Version";
+
+static NSString* gOriginalUserAgent = nil;
+static NSInteger gNextLockToken = 0;
+static NSInteger gCurrentLockToken = 0;
+static NSMutableArray* gPendingSetUserAgentBlocks = nil;
+
+@implementation CDVUserAgentUtil
+
++ (NSString*)originalUserAgent
+{
+    if (gOriginalUserAgent == nil) {
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppLocaleDidChange:)
+                                                     name:NSCurrentLocaleDidChangeNotification object:nil];
+
+        NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
+        NSString* systemVersion = [[UIDevice currentDevice] systemVersion];
+        NSString* localeStr = [[NSLocale currentLocale] localeIdentifier];
+        // Record the model since simulator can change it without re-install (CB-5420).
+        NSString* model = [UIDevice currentDevice].model;
+        NSString* systemAndLocale = [NSString stringWithFormat:@"%@ %@ %@", model, systemVersion, localeStr];
+
+        NSString* cordovaUserAgentVersion = [userDefaults stringForKey:kCdvUserAgentVersionKey];
+        gOriginalUserAgent = [userDefaults stringForKey:kCdvUserAgentKey];
+        BOOL cachedValueIsOld = ![systemAndLocale isEqualToString:cordovaUserAgentVersion];
+
+        if ((gOriginalUserAgent == nil) || cachedValueIsOld) {
+            UIWebView* sampleWebView = [[UIWebView alloc] initWithFrame:CGRectZero];
+            gOriginalUserAgent = [sampleWebView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
+
+            [userDefaults setObject:gOriginalUserAgent forKey:kCdvUserAgentKey];
+            [userDefaults setObject:systemAndLocale forKey:kCdvUserAgentVersionKey];
+
+            [userDefaults synchronize];
+        }
+    }
+    return gOriginalUserAgent;
+}
+
++ (void)onAppLocaleDidChange:(NSNotification*)notification
+{
+    // TODO: We should figure out how to update the user-agent of existing UIWebViews when this happens.
+    // Maybe use the PDF bug (noted in setUserAgent:).
+    gOriginalUserAgent = nil;
+}
+
++ (void)acquireLock:(void (^)(NSInteger lockToken))block
+{
+    if (gCurrentLockToken == 0) {
+        gCurrentLockToken = ++gNextLockToken;
+        VerboseLog(@"Gave lock %d", gCurrentLockToken);
+        block(gCurrentLockToken);
+    } else {
+        if (gPendingSetUserAgentBlocks == nil) {
+            gPendingSetUserAgentBlocks = [[NSMutableArray alloc] initWithCapacity:4];
+        }
+        VerboseLog(@"Waiting for lock");
+        [gPendingSetUserAgentBlocks addObject:block];
+    }
+}
+
++ (void)releaseLock:(NSInteger*)lockToken
+{
+    if (*lockToken == 0) {
+        return;
+    }
+    NSAssert(gCurrentLockToken == *lockToken, @"Got token %ld, expected %ld", (long)*lockToken, (long)gCurrentLockToken);
+
+    VerboseLog(@"Released lock %d", *lockToken);
+    if ([gPendingSetUserAgentBlocks count] > 0) {
+        void (^block)() = [gPendingSetUserAgentBlocks objectAtIndex:0];
+        [gPendingSetUserAgentBlocks removeObjectAtIndex:0];
+        gCurrentLockToken = ++gNextLockToken;
+        NSLog(@"Gave lock %ld", (long)gCurrentLockToken);
+        block(gCurrentLockToken);
+    } else {
+        gCurrentLockToken = 0;
+    }
+    *lockToken = 0;
+}
+
++ (void)setUserAgent:(NSString*)value lockToken:(NSInteger)lockToken
+{
+    NSAssert(gCurrentLockToken == lockToken, @"Got token %ld, expected %ld", (long)lockToken, (long)gCurrentLockToken);
+    VerboseLog(@"User-Agent set to: %@", value);
+
+    // Setting the UserAgent must occur before a UIWebView is instantiated.
+    // It is read per instantiation, so it does not affect previously created views.
+    // Except! When a PDF is loaded, all currently active UIWebViews reload their
+    // User-Agent from the NSUserDefaults some time after the DidFinishLoad of the PDF bah!
+    NSDictionary* dict = [[NSDictionary alloc] initWithObjectsAndKeys:value, @"UserAgent", nil];
+    [[NSUserDefaults standardUserDefaults] registerDefaults:dict];
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Public/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.h b/CordovaLib/Classes/Public/CDVViewController.h
new file mode 100644
index 0000000..e3ead2f
--- /dev/null
+++ b/CordovaLib/Classes/Public/CDVViewController.h
@@ -0,0 +1,87 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <UIKit/UIKit.h>
+#import <Foundation/NSJSONSerialization.h>
+#import "CDVAvailability.h"
+#import "CDVInvokedUrlCommand.h"
+#import "CDVCommandDelegate.h"
+#import "CDVCommandQueue.h"
+#import "CDVWhitelist.h"
+#import "CDVScreenOrientationDelegate.h"
+#import "CDVPlugin.h"
+#import "CDVWebViewEngineProtocol.h"
+
+@interface CDVViewController : UIViewController <UIWebViewDelegate, CDVScreenOrientationDelegate>{
+    @protected
+    id <CDVWebViewEngineProtocol> _webViewEngine;
+    @protected
+    id <CDVCommandDelegate> _commandDelegate;
+    @protected
+    CDVCommandQueue* _commandQueue;
+    NSString* _userAgent;
+}
+
+@property (nonatomic, readonly, weak) IBOutlet UIView* webView;
+
+@property (nonatomic, readonly, strong) NSMutableDictionary* pluginObjects;
+@property (nonatomic, readonly, strong) NSDictionary* pluginsMap;
+@property (nonatomic, readonly, strong) NSMutableDictionary* settings;
+@property (nonatomic, readonly, strong) NSXMLParser* configParser;
+@property (nonatomic, readonly, strong) CDVWhitelist* whitelist; // readonly for public
+@property (nonatomic, readonly, assign) BOOL loadFromString;
+
+@property (nonatomic, readwrite, copy) NSString* wwwFolderName;
+@property (nonatomic, readwrite, copy) NSString* startPage;
+@property (nonatomic, readonly, strong) CDVCommandQueue* commandQueue;
+@property (nonatomic, readonly, strong) id <CDVWebViewEngineProtocol> webViewEngine;
+@property (nonatomic, readonly, strong) id <CDVCommandDelegate> commandDelegate;
+
+/**
+ The complete user agent that Cordova will use when sending web requests.
+ */
+@property (nonatomic, readonly) NSString* userAgent;
+
+/**
+ The base user agent data that Cordova will use to build its user agent.  If this
+ property isn't set, Cordova will use the standard web view user agent as its
+ base.
+ */
+@property (nonatomic, readwrite, copy) NSString* baseUserAgent;
+
++ (NSDictionary*)getBundlePlist:(NSString*)plistName;
++ (NSString*)applicationDocumentsDirectory;
+
+- (void)printMultitaskingInfo;
+- (void)createGapView;
+- (UIView*)newCordovaViewWithFrame:(CGRect)bounds;
+
+- (void)javascriptAlert:(NSString*)text;
+- (NSString*)appURLScheme;
+
+- (NSArray*)parseInterfaceOrientations:(NSArray*)orientations;
+- (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation;
+
+- (id)getCommandInstance:(NSString*)pluginName;
+- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className;
+- (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName;
+
+- (BOOL)URLisAllowed:(NSURL*)url;
+
+@end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[42/50] [abbrv] ios commit: CB-7767 - Removed NSData+Base64 files, updated unit tests.

Posted by ia...@apache.org.
CB-7767 - Removed NSData+Base64 files, updated unit tests.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/2e5510ea
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/2e5510ea
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/2e5510ea

Branch: refs/heads/unplug-whitelist
Commit: 2e5510ea919546850bfc9553fa20bdd2eb562bed
Parents: acb703a
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Mar 18 17:38:49 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Mar 18 17:38:49 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDV.h                 |   1 -
 CordovaLib/Classes/Public/NSData+Base64.h       |  43 ---
 CordovaLib/Classes/Public/NSData+Base64.m       | 298 -------------------
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj |   8 -
 tests/CordovaLibTests/CDVBase64Tests.m          |   6 +-
 5 files changed, 2 insertions(+), 354 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2e5510ea/CordovaLib/Classes/Public/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDV.h b/CordovaLib/Classes/Public/CDV.h
index 732494c..bfc3e44 100644
--- a/CordovaLib/Classes/Public/CDV.h
+++ b/CordovaLib/Classes/Public/CDV.h
@@ -32,4 +32,3 @@
 #import "CDVScreenOrientationDelegate.h"
 #import "CDVTimer.h"
 #import "CDVUserAgentUtil.h"
-#import "NSData+Base64.h"

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2e5510ea/CordovaLib/Classes/Public/NSData+Base64.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/NSData+Base64.h b/CordovaLib/Classes/Public/NSData+Base64.h
deleted file mode 100644
index 02d960c..0000000
--- a/CordovaLib/Classes/Public/NSData+Base64.h
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-//  NSData+Base64.h
-//  base64
-//
-//  Created by Matt Gallagher on 2009/06/03.
-//  Copyright 2009 Matt Gallagher. All rights reserved.
-//
-//  This software is provided 'as-is', without any express or implied
-//  warranty. In no event will the authors be held liable for any damages
-//  arising from the use of this software. Permission is granted to anyone to
-//  use this software for any purpose, including commercial applications, and to
-//  alter it and redistribute it freely, subject to the following restrictions:
-//
-//  1. The origin of this software must not be misrepresented; you must not
-//     claim that you wrote the original software. If you use this software
-//     in a product, an acknowledgment in the product documentation would be
-//     appreciated but is not required.
-//  2. Altered source versions must be plainly marked as such, and must not be
-//     misrepresented as being the original software.
-//  3. This notice may not be removed or altered from any source
-//     distribution.
-//
-
-#import <Foundation/Foundation.h>
-#import "CDVAvailabilityDeprecated.h"
-
-void *CDVNewBase64Decode(
-    const char* inputBuffer,
-    size_t    length,
-    size_t    * outputLength);
-
-char *CDVNewBase64Encode(
-    const void* inputBuffer,
-    size_t    length,
-    bool      separateLines,
-    size_t    * outputLength);
-
-@interface NSData (CDVBase64)
-
-+ (NSData*)cdv_dataFromBase64String:(NSString*)aString;
-- (NSString*)cdv_base64EncodedString;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2e5510ea/CordovaLib/Classes/Public/NSData+Base64.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/NSData+Base64.m b/CordovaLib/Classes/Public/NSData+Base64.m
deleted file mode 100644
index 43560f0..0000000
--- a/CordovaLib/Classes/Public/NSData+Base64.m
+++ /dev/null
@@ -1,298 +0,0 @@
-//
-//  NSData+Base64.m
-//  base64
-//
-//  Created by Matt Gallagher on 2009/06/03.
-//  Copyright 2009 Matt Gallagher. All rights reserved.
-//
-//  This software is provided 'as-is', without any express or implied
-//  warranty. In no event will the authors be held liable for any damages
-//  arising from the use of this software. Permission is granted to anyone to
-//  use this software for any purpose, including commercial applications, and to
-//  alter it and redistribute it freely, subject to the following restrictions:
-//
-//  1. The origin of this software must not be misrepresented; you must not
-//     claim that you wrote the original software. If you use this software
-//     in a product, an acknowledgment in the product documentation would be
-//     appreciated but is not required.
-//  2. Altered source versions must be plainly marked as such, and must not be
-//     misrepresented as being the original software.
-//  3. This notice may not be removed or altered from any source
-//     distribution.
-//
-
-#import "NSData+Base64.h"
-
-//
-// Mapping from 6 bit pattern to ASCII character.
-//
-static unsigned char base64EncodeLookup[65] =
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-//
-// Definition for "masked-out" areas of the base64DecodeLookup mapping
-//
-#define xx 65
-
-//
-// Mapping from ASCII character to 6 bit pattern.
-//
-static unsigned char base64DecodeLookup[256] =
-{
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 62, xx, xx, xx, 63,
-    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, xx, xx, xx, xx, xx, xx,
-    xx, 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  10, 11, 12, 13, 14,
-    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, xx, xx, xx, xx, xx,
-    xx, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-};
-
-//
-// Fundamental sizes of the binary and base64 encode/decode units in bytes
-//
-#define BINARY_UNIT_SIZE 3
-#define BASE64_UNIT_SIZE 4
-
-//
-// NewBase64Decode
-//
-// Decodes the base64 ASCII string in the inputBuffer to a newly malloced
-// output buffer.
-//
-//  inputBuffer - the source ASCII string for the decode
-//	length - the length of the string or -1 (to specify strlen should be used)
-//	outputLength - if not-NULL, on output will contain the decoded length
-//
-// returns the decoded buffer. Must be free'd by caller. Length is given by
-//	outputLength.
-//
-void *CDVNewBase64Decode(
-    const char* inputBuffer,
-    size_t    length,
-    size_t    * outputLength)
-{
-    if (length == -1) {
-        length = strlen(inputBuffer);
-    }
-
-    size_t outputBufferSize =
-        ((length + BASE64_UNIT_SIZE - 1) / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE;
-    unsigned char* outputBuffer = (unsigned char*)malloc(outputBufferSize);
-
-    size_t i = 0;
-    size_t j = 0;
-
-    while (i < length) {
-        //
-        // Accumulate 4 valid characters (ignore everything else)
-        //
-        unsigned char accumulated[BASE64_UNIT_SIZE];
-        size_t accumulateIndex = 0;
-
-        while (i < length) {
-            unsigned char decode = base64DecodeLookup[inputBuffer[i++]];
-            if (decode != xx) {
-                accumulated[accumulateIndex] = decode;
-                accumulateIndex++;
-
-                if (accumulateIndex == BASE64_UNIT_SIZE) {
-                    break;
-                }
-            }
-        }
-
-        //
-        // Store the 6 bits from each of the 4 characters as 3 bytes
-        //
-        // (Uses improved bounds checking suggested by Alexandre Colucci)
-        //
-        if (accumulateIndex >= 2) {
-            outputBuffer[j] = (accumulated[0] << 2) | (accumulated[1] >> 4);
-        }
-        if (accumulateIndex >= 3) {
-            outputBuffer[j + 1] = (accumulated[1] << 4) | (accumulated[2] >> 2);
-        }
-        if (accumulateIndex >= 4) {
-            outputBuffer[j + 2] = (accumulated[2] << 6) | accumulated[3];
-        }
-        j += accumulateIndex - 1;
-    }
-
-    if (outputLength) {
-        *outputLength = j;
-    }
-    return outputBuffer;
-}
-
-//
-// NewBase64Encode
-//
-// Encodes the arbitrary data in the inputBuffer as base64 into a newly malloced
-// output buffer.
-//
-//  inputBuffer - the source data for the encode
-//	length - the length of the input in bytes
-//  separateLines - if zero, no CR/LF characters will be added. Otherwise
-//		a CR/LF pair will be added every 64 encoded chars.
-//	outputLength - if not-NULL, on output will contain the encoded length
-//		(not including terminating 0 char)
-//
-// returns the encoded buffer. Must be free'd by caller. Length is given by
-//	outputLength.
-//
-char *CDVNewBase64Encode(
-    const void* buffer,
-    size_t    length,
-    bool      separateLines,
-    size_t    * outputLength)
-{
-    const unsigned char* inputBuffer = (const unsigned char*)buffer;
-
-#define MAX_NUM_PADDING_CHARS 2
-#define OUTPUT_LINE_LENGTH 64
-#define INPUT_LINE_LENGTH ((OUTPUT_LINE_LENGTH / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE)
-#define CR_LF_SIZE 2
-
-    //
-    // Byte accurate calculation of final buffer size
-    //
-    size_t outputBufferSize =
-        ((length / BINARY_UNIT_SIZE)
-        + ((length % BINARY_UNIT_SIZE) ? 1 : 0))
-        * BASE64_UNIT_SIZE;
-    if (separateLines) {
-        outputBufferSize +=
-            (outputBufferSize / OUTPUT_LINE_LENGTH) * CR_LF_SIZE;
-    }
-
-    //
-    // Include space for a terminating zero
-    //
-    outputBufferSize += 1;
-
-    //
-    // Allocate the output buffer
-    //
-    char* outputBuffer = (char*)malloc(outputBufferSize);
-    if (!outputBuffer) {
-        return NULL;
-    }
-
-    size_t i = 0;
-    size_t j = 0;
-    const size_t lineLength = separateLines ? INPUT_LINE_LENGTH : length;
-    size_t lineEnd = lineLength;
-
-    while (true) {
-        if (lineEnd > length) {
-            lineEnd = length;
-        }
-
-        for (; i + BINARY_UNIT_SIZE - 1 < lineEnd; i += BINARY_UNIT_SIZE) {
-            //
-            // Inner loop: turn 48 bytes into 64 base64 characters
-            //
-            outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
-            outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
-                | ((inputBuffer[i + 1] & 0xF0) >> 4)];
-            outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i + 1] & 0x0F) << 2)
-                | ((inputBuffer[i + 2] & 0xC0) >> 6)];
-            outputBuffer[j++] = base64EncodeLookup[inputBuffer[i + 2] & 0x3F];
-        }
-
-        if (lineEnd == length) {
-            break;
-        }
-
-        //
-        // Add the newline
-        //
-        // outputBuffer[j++] = '\r';
-        // outputBuffer[j++] = '\n';
-        lineEnd += lineLength;
-    }
-
-    if (i + 1 < length) {
-        //
-        // Handle the single '=' case
-        //
-        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
-        outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
-            | ((inputBuffer[i + 1] & 0xF0) >> 4)];
-        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i + 1] & 0x0F) << 2];
-        outputBuffer[j++] = '=';
-    } else if (i < length) {
-        //
-        // Handle the double '=' case
-        //
-        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
-        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0x03) << 4];
-        outputBuffer[j++] = '=';
-        outputBuffer[j++] = '=';
-    }
-    outputBuffer[j] = 0;
-
-    //
-    // Set the output length and return the buffer
-    //
-    if (outputLength) {
-        *outputLength = j;
-    }
-    return outputBuffer;
-}
-
-@implementation NSData (CDVBase64)
-
-//
-// dataFromBase64String:
-//
-// Creates an NSData object containing the base64 decoded representation of
-// the base64 string 'aString'
-//
-// Parameters:
-//    aString - the base64 string to decode
-//
-// returns the autoreleased NSData representation of the base64 string
-//
-+ (NSData*)cdv_dataFromBase64String:(NSString*)aString
-{
-    size_t outputLength = 0;
-    void* outputBuffer = CDVNewBase64Decode([aString UTF8String], [aString length], &outputLength);
-
-    return [NSData dataWithBytesNoCopy:outputBuffer length:outputLength freeWhenDone:YES];
-}
-
-//
-// base64EncodedString
-//
-// Creates an NSString object that contains the base 64 encoding of the
-// receiver's data. Lines are broken at 64 characters long.
-//
-// returns an autoreleased NSString being the base 64 representation of the
-//	receiver.
-//
-- (NSString*)cdv_base64EncodedString
-{
-    size_t outputLength = 0;
-    char* outputBuffer =
-        CDVNewBase64Encode([self bytes], [self length], true, &outputLength);
-
-    NSString* result = [[NSString alloc] initWithBytesNoCopy:outputBuffer
-                                                      length:outputLength
-                                                    encoding:NSASCIIStringEncoding
-                                                freeWhenDone:YES];
-
-    return result;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2e5510ea/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index c926943..be4f0f4 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -51,8 +51,6 @@
 		7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D531AB9029B008C4574 /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D541AB9029B008C4574 /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */; };
-		7ED95D551AB9029B008C4574 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2F1AB9029B008C4574 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7ED95D561AB9029B008C4574 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D301AB9029B008C4574 /* NSData+Base64.m */; };
 		7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */; };
 		7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -106,8 +104,6 @@
 		7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewEngineProtocol.h; sourceTree = "<group>"; };
 		7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWhitelist.h; sourceTree = "<group>"; };
 		7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWhitelist.m; sourceTree = "<group>"; };
-		7ED95D2F1AB9029B008C4574 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Base64.h"; sourceTree = "<group>"; };
-		7ED95D301AB9029B008C4574 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Base64.m"; sourceTree = "<group>"; };
 		7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+CordovaPreferences.h"; sourceTree = "<group>"; };
 		7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+CordovaPreferences.m"; sourceTree = "<group>"; };
 		7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
@@ -233,8 +229,6 @@
 				7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */,
 				7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */,
 				7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */,
-				7ED95D2F1AB9029B008C4574 /* NSData+Base64.h */,
-				7ED95D301AB9029B008C4574 /* NSData+Base64.m */,
 				7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */,
 				7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */,
 				7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */,
@@ -258,7 +252,6 @@
 				7ED95D3D1AB9029B008C4574 /* CDVCommandQueue.h in Headers */,
 				7ED95D531AB9029B008C4574 /* CDVWhitelist.h in Headers */,
 				7ED95D361AB9029B008C4574 /* CDVAppDelegate.h in Headers */,
-				7ED95D551AB9029B008C4574 /* NSData+Base64.h in Headers */,
 				7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */,
 				7ED95D381AB9029B008C4574 /* CDVAvailability.h in Headers */,
 				7ED95D0A1AB9028C008C4574 /* CDVUIWebViewDelegate.h in Headers */,
@@ -337,7 +330,6 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				7ED95D561AB9029B008C4574 /* NSData+Base64.m in Sources */,
 				7ED95D511AB9029B008C4574 /* CDVViewController.m in Sources */,
 				7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */,
 				7ED95D371AB9029B008C4574 /* CDVAppDelegate.m in Sources */,

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2e5510ea/tests/CordovaLibTests/CDVBase64Tests.m
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CDVBase64Tests.m b/tests/CordovaLibTests/CDVBase64Tests.m
index 34c010e..d4647f5 100644
--- a/tests/CordovaLibTests/CDVBase64Tests.m
+++ b/tests/CordovaLibTests/CDVBase64Tests.m
@@ -19,8 +19,6 @@
 
 #import <XCTest/XCTest.h>
 
-#import <Cordova/NSData+Base64.h>
-
 @interface CDVBase64Tests : XCTestCase
 @end
 
@@ -46,7 +44,7 @@
     NSData* decodedData = [decodedString dataUsingEncoding:NSUTF8StringEncoding];
 
     NSString* expectedEncodedString = @"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwIUAjJCVeJg==";
-    NSString* actualEncodedString = [decodedData cdv_base64EncodedString];
+    NSString* actualEncodedString = [decodedData base64EncodedStringWithOptions:0];
 
     XCTAssertTrue([expectedEncodedString isEqualToString:actualEncodedString]);
 }
@@ -56,7 +54,7 @@
     NSString* encodedString = @"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwIUAjJCVeJg==";
     NSString* decodedString = @"abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&";
     NSData* encodedData = [decodedString dataUsingEncoding:NSUTF8StringEncoding];
-    NSData* decodedData = [NSData cdv_dataFromBase64String:encodedString];
+    NSData* decodedData = [[NSData alloc] initWithBase64EncodedString:encodedString options:0];
 
     XCTAssertTrue([encodedData isEqualToData:decodedData]);
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[20/50] [abbrv] ios commit: CB-7428: Add bridging header. Make sure all deployment targets are 7.0 Add swift runtime to search path (closes #133)

Posted by ia...@apache.org.
CB-7428: Add bridging header.  Make sure all deployment targets are 7.0 Add swift runtime to search path (closes #133)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/5c6b4949
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/5c6b4949
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/5c6b4949

Branch: refs/heads/unplug-whitelist
Commit: 5c6b4949a390300db955273c6c736f97aa65d28a
Parents: f55cfb4
Author: Connor Pearson <cj...@gmail.com>
Authored: Mon Mar 9 19:07:53 2015 -0400
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Mar 16 18:06:09 2015 -0700

----------------------------------------------------------------------
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj |  6 ++---
 .../project/__CLI__.xcodeproj/project.pbxproj   |  6 +++++
 .../__NON-CLI__.xcodeproj/project.pbxproj       |  6 +++++
 .../project/__PROJECT_NAME__/Bridging-Header.h  | 28 ++++++++++++++++++++
 .../CordovaLibApp/Bridging-Header.h             | 28 ++++++++++++++++++++
 .../CordovaLibTests.xcodeproj/project.pbxproj   | 14 +++++++---
 6 files changed, 81 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5c6b4949/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index 2957580..65da551 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -360,7 +360,7 @@
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
 				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				PRODUCT_NAME = Cordova;
 				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
 				SKIP_INSTALL = YES;
@@ -386,7 +386,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_CFLAGS = "-DDEBUG";
 				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
@@ -415,7 +415,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				ONLY_ACTIVE_ARCH = NO;
 				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
 				SDKROOT = iphoneos;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5c6b4949/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
index f652e8d..725ce17 100755
--- a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
@@ -105,6 +105,7 @@
 		EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = "<group>"; };
 		EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = "<group>"; };
 		F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = "__PROJECT_NAME__/config.xml"; sourceTree = "<group>"; };
+		ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Bridging-Header.h"; path = "Bridging-Header.h"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -166,6 +167,7 @@
 			children = (
 				32CA4F630368D1EE00C91783 /* __PROJECT_NAME__-Prefix.pch */,
 				29B97316FDCFA39411CA2CEA /* main.m */,
+				ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */,
 			);
 			name = "Other Sources";
 			path = "__PROJECT_NAME__";
@@ -416,6 +418,7 @@
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
 				OTHER_LDFLAGS = (
 					"-weak_framework",
 					CoreFoundation,
@@ -446,6 +449,7 @@
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
 				OTHER_LDFLAGS = (
 					"-weak_framework",
 					CoreFoundation,
@@ -504,6 +508,7 @@
 				);
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
+				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
 				USER_HEADER_SEARCH_PATHS = "";
 			};
 			name = Debug;
@@ -548,6 +553,7 @@
 				);
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
+				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
 				USER_HEADER_SEARCH_PATHS = "";
 			};
 			name = Release;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5c6b4949/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
index db2ef14..e0f5ce8 100755
--- a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
@@ -100,6 +100,7 @@
 		8D1107310486CEB800E47090 /* __PROJECT_NAME__-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "__PROJECT_NAME__-Info.plist"; path = "../__PROJECT_NAME__-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
 		D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x~iphone.png"; sourceTree = "<group>"; };
 		F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = "__PROJECT_NAME__/config.xml"; sourceTree = "<group>"; };
+		ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Bridging-Header.h"; path = "Bridging-Header.h"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -159,6 +160,7 @@
 			children = (
 				32CA4F630368D1EE00C91783 /* __PROJECT_NAME__-Prefix.pch */,
 				29B97316FDCFA39411CA2CEA /* main.m */,
+				ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */,
 			);
 			name = "Other Sources";
 			path = "__PROJECT_NAME__";
@@ -400,6 +402,7 @@
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
 				OTHER_LDFLAGS = (
 					"-weak_framework",
 					CoreFoundation,
@@ -430,6 +433,7 @@
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
 				OTHER_LDFLAGS = (
 					"-weak_framework",
 					CoreFoundation,
@@ -488,6 +492,7 @@
 				);
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
+				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
 				USER_HEADER_SEARCH_PATHS = "";
 			};
 			name = Debug;
@@ -532,6 +537,7 @@
 				);
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
+				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
 				USER_HEADER_SEARCH_PATHS = "";
 			};
 			name = Release;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5c6b4949/bin/templates/project/__PROJECT_NAME__/Bridging-Header.h
----------------------------------------------------------------------
diff --git a/bin/templates/project/__PROJECT_NAME__/Bridging-Header.h b/bin/templates/project/__PROJECT_NAME__/Bridging-Header.h
new file mode 100644
index 0000000..5d8abc9
--- /dev/null
+++ b/bin/templates/project/__PROJECT_NAME__/Bridging-Header.h
@@ -0,0 +1,28 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+//
+//  Bridging-Header.h
+//  __PROJECT_NAME__
+//
+//  Created by ___FULLUSERNAME___ on ___DATE___.
+//  Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
+//
+//
+//  Use this file to import your target's public headers that you would like to expose to Swift.
+//
+
+#import <Cordova/CDV.h>

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5c6b4949/tests/CordovaLibTests/CordovaLibApp/Bridging-Header.h
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CordovaLibApp/Bridging-Header.h b/tests/CordovaLibTests/CordovaLibApp/Bridging-Header.h
new file mode 100644
index 0000000..5d8abc9
--- /dev/null
+++ b/tests/CordovaLibTests/CordovaLibApp/Bridging-Header.h
@@ -0,0 +1,28 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+//
+//  Bridging-Header.h
+//  __PROJECT_NAME__
+//
+//  Created by ___FULLUSERNAME___ on ___DATE___.
+//  Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
+//
+//
+//  Use this file to import your target's public headers that you would like to expose to Swift.
+//
+
+#import <Cordova/CDV.h>

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5c6b4949/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
index ef69b19..be2e74a 100644
--- a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
+++ b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
@@ -133,6 +133,7 @@
 		EBA3554515A731F100F4DE24 /* CDVFakeFileManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVFakeFileManager.m; sourceTree = "<group>"; };
 		EBA7F20417962CCD001A0CE6 /* CDVStartPageTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVStartPageTests.m; sourceTree = "<group>"; };
 		F8EB14D0165FFD3200616F39 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = CordovaLibApp/config.xml; sourceTree = "<group>"; };
+		ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Bridging-Header.h"; path = "Bridging-Header.h"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -247,6 +248,7 @@
 				303A406F152124BB00182201 /* CordovaLibApp-Info.plist */,
 				303A4070152124BB00182201 /* InfoPlist.strings */,
 				303A4073152124BB00182201 /* main.m */,
+				ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */,
 			);
 			name = "Supporting Files";
 			sourceTree = "<group>";
@@ -532,6 +534,8 @@
 				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
+				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
 				TARGETED_DEVICE_FAMILY = "1,2";
 				USER_HEADER_SEARCH_PATHS = "Classes/**";
 			};
@@ -567,6 +571,8 @@
 				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
+				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
 				TARGETED_DEVICE_FAMILY = "1,2";
 				USER_HEADER_SEARCH_PATHS = "Classes/**";
 			};
@@ -592,7 +598,7 @@
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				INFOPLIST_FILE = "CordovaLibApp/CordovaLibApp-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				TARGETED_DEVICE_FAMILY = "1,2";
 				USER_HEADER_SEARCH_PATHS = "";
@@ -615,7 +621,7 @@
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				INFOPLIST_FILE = "CordovaLibApp/CordovaLibApp-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				TARGETED_DEVICE_FAMILY = "1,2";
@@ -642,7 +648,7 @@
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 				INFOPLIST_FILE = "CordovaLibTests-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_LDFLAGS = (
 					"-all_load",
@@ -669,7 +675,7 @@
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 				INFOPLIST_FILE = "CordovaLibTests-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				ONLY_ACTIVE_ARCH = NO;
 				OTHER_LDFLAGS = (
 					"-all_load",


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[46/50] [abbrv] ios commit: Defer whitelist decisions to plugins

Posted by ia...@apache.org.
Defer whitelist decisions to plugins


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/1e8ae646
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/1e8ae646
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/1e8ae646

Branch: refs/heads/unplug-whitelist
Commit: 1e8ae6462a5632efc6caecfecc4c8a6d06c069fc
Parents: c52e7ec
Author: Ian Clelland <ic...@chromium.org>
Authored: Mon Oct 27 10:59:40 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Mar 19 11:06:30 2015 -0400

----------------------------------------------------------------------
 .../Classes/Public/CDVCommandDelegateImpl.m     |  3 +-
 CordovaLib/Classes/Public/CDVURLProtocol.m      | 10 ++-
 CordovaLib/Classes/Public/CDVViewController.h   |  2 +-
 CordovaLib/Classes/Public/CDVViewController.m   | 65 ++++++++++----------
 4 files changed, 37 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1e8ae646/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m b/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m
index d4df6c3..629d8e8 100644
--- a/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m
+++ b/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m
@@ -175,8 +175,7 @@
 
 - (BOOL)URLIsWhitelisted:(NSURL*)url
 {
-    return ![_viewController.whitelist schemeIsAllowed:[url scheme]] ||
-           [_viewController.whitelist URLIsAllowed:url logFailure:NO];
+    return [_viewController shouldAllowNavigationToURL:url];
 }
 
 - (NSDictionary*)settings

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1e8ae646/CordovaLib/Classes/Public/CDVURLProtocol.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVURLProtocol.m b/CordovaLib/Classes/Public/CDVURLProtocol.m
index fce5783..a7a38cd 100644
--- a/CordovaLib/Classes/Public/CDVURLProtocol.m
+++ b/CordovaLib/Classes/Public/CDVURLProtocol.m
@@ -131,12 +131,10 @@ static CDVViewController *viewControllerForRequest(NSURLRequest* request)
             // For this reason, we return NO when cmds exist.
             return !hasCmds;
         }
-        // we only care about http and https connections.
-        // CORS takes care of http: trying to access file: URLs.
-        if ([gWhitelist schemeIsAllowed:[theUrl scheme]]) {
-            // if it FAILS the whitelist, we return TRUE, so we can fail the connection later
-            return ![gWhitelist URLIsAllowed:theUrl];
-        }
+        // Returning YES here means that the request will be handled below, by startLoading, which will
+        // override the network layer and return a 401 instead. Returning NO means that the network layer
+        // will perform as ususal, and the request will be proceed.
+        return ![viewController shouldAllowRequestForURL:theUrl];
     }
 
     return NO;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1e8ae646/CordovaLib/Classes/Public/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.h b/CordovaLib/Classes/Public/CDVViewController.h
index 693b1e8..f654d6c 100644
--- a/CordovaLib/Classes/Public/CDVViewController.h
+++ b/CordovaLib/Classes/Public/CDVViewController.h
@@ -82,7 +82,7 @@
 - (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className;
 - (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName;
 
-- (BOOL)URLisAllowed:(NSURL*)url;
+- (BOOL)URLisAllowed:(NSURL*)url __attribute__((deprecated));
 - (BOOL)shouldAllowRequestForURL:(NSURL *)url;
 - (BOOL)shouldAllowNavigationToURL:(NSURL *)url;
 - (BOOL)shouldOpenExternalURL:(NSURL *)url;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1e8ae646/CordovaLib/Classes/Public/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index aeade66..7247200 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -156,11 +156,7 @@
 
 - (BOOL)URLisAllowed:(NSURL*)url
 {
-    if (self.whitelist == nil) {
-        return YES;
-    }
-
-    return [self.whitelist URLIsAllowed:url];
+    return [self shouldAllowNavigationToURL:url];
 }
 
 - (void)parseSettingsWithParser:(NSObject<NSXMLParserDelegate> *)delegate
@@ -629,24 +625,44 @@
     }
 
     /*
-     * If a URL is being loaded that's a file/http/https URL, just load it internally
+     *    If we loaded the HTML from a string, we let the app handle it
      */
-    if ([url isFileURL]) {
+    if (self.loadFromString == YES) {
+        self.loadFromString = NO;
         return YES;
     }
 
     /*
-     *    If we loaded the HTML from a string, we let the app handle it
+     * Handle all other types of urls (tel:, sms:), and requests to load a url in the main webview.
      */
-    else if (self.loadFromString == YES) {
-        self.loadFromString = NO;
+    BOOL shouldAllowNavigation = [self shouldAllowNavigationToURL:url];
+    if (shouldAllowNavigation) {
         return YES;
+    } else {
+        BOOL shouldOpenExternalURL = [self shouldOpenExternalURL:url];
+        if (shouldOpenExternalURL) {
+            if ([[UIApplication sharedApplication] canOpenURL:url]) {
+                [[UIApplication sharedApplication] openURL:url];
+            } else { // handle any custom schemes to plugins
+                [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
+            }
+        }
     }
 
+    return NO;
+}
+
+#pragma mark Network Policy Plugin (Whitelist) hooks
+
+/* This implements the default policy for resource loading and navigation, if there
+ * are no plugins installed which override the whitelist methods.
+ */
+- (BOOL)defaultResourcePolicyForURL:(NSURL *)url
+{
     /*
-     * all tel: scheme urls we let the UIWebview handle it using the default behavior
+     * If a URL is being loaded that's a file/http/https URL, just load it internally
      */
-    else if ([[url scheme] isEqualToString:@"tel"]) {
+    if ([url isFileURL]) {
         return YES;
     }
 
@@ -664,28 +680,9 @@
         return YES;
     }
 
-    /*
-     * Handle all other types of urls (tel:, sms:), and requests to load a url in the main webview.
-     */
-    else {
-        if ([self.whitelist schemeIsAllowed:[url scheme]]) {
-            return [self.whitelist URLIsAllowed:url];
-        } else {
-            if ([[UIApplication sharedApplication] canOpenURL:url]) {
-                [[UIApplication sharedApplication] openURL:url];
-            } else { // handle any custom schemes to plugins
-                [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
-            }
-        }
-
-        return NO;
-    }
-
-    return YES;
+    return NO;
 }
 
-#pragma mark Network Policy Plugin (Whitelist) hooks
-
 - (BOOL)shouldAllowRequestForURL:(NSURL *)url
 {
     BOOL anyPluginsResponded = NO;
@@ -706,7 +703,7 @@
     }
 
     /* Default Policy */
-    return NO;
+    return [self defaultResourcePolicyForURL:url];
 }
 
 
@@ -730,7 +727,7 @@
     }
 
     /* Default Policy */
-    return NO;
+    return [self defaultResourcePolicyForURL:url];
 }
 
 - (BOOL)shouldOpenExternalURL:(NSURL *)url


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[11/50] [abbrv] ios commit: Make CDVUIWebViewDelegate header public (for CDVInAppBrowser)

Posted by ia...@apache.org.
Make CDVUIWebViewDelegate header public (for CDVInAppBrowser)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/9bf43635
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/9bf43635
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/9bf43635

Branch: refs/heads/unplug-whitelist
Commit: 9bf43635a99e6529187180a25db78a1ea82bc198
Parents: 4a466f1
Author: Shazron Abdullah <sh...@gmail.com>
Authored: Fri Mar 13 18:47:42 2015 -0700
Committer: Shazron Abdullah <sh...@gmail.com>
Committed: Fri Mar 13 18:47:42 2015 -0700

----------------------------------------------------------------------
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/9bf43635/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index 0b3e4e0..2dbf054 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -49,7 +49,7 @@
 		EB96673B16A8970A00D86CDF /* CDVUserAgentUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = EB96673916A8970900D86CDF /* CDVUserAgentUtil.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		EB96673C16A8970A00D86CDF /* CDVUserAgentUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = EB96673A16A8970900D86CDF /* CDVUserAgentUtil.m */; };
 		EBFF4DBC16D3FE2E008F452B /* CDVUIWebViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EBFF4DBA16D3FE2E008F452B /* CDVUIWebViewDelegate.m */; };
-		EBFF4DBD16D3FE2E008F452B /* CDVUIWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = EBFF4DBB16D3FE2E008F452B /* CDVUIWebViewDelegate.h */; };
+		EBFF4DBD16D3FE2E008F452B /* CDVUIWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = EBFF4DBB16D3FE2E008F452B /* CDVUIWebViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		F858FBC6166009A8007DA594 /* CDVConfigParser.h in Headers */ = {isa = PBXBuildFile; fileRef = F858FBC4166009A8007DA594 /* CDVConfigParser.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		F858FBC7166009A8007DA594 /* CDVConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F858FBC5166009A8007DA594 /* CDVConfigParser.m */; };
 /* End PBXBuildFile section */
@@ -228,9 +228,9 @@
 				7E5D94151AB23DB400F4D9EB /* CDVPlugin+Private.h in Headers */,
 				306ADAE71AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h in Headers */,
 				EB6A98571A77FA430013FCDB /* NSData+Base64.h in Headers */,
+				EBFF4DBD16D3FE2E008F452B /* CDVUIWebViewDelegate.h in Headers */,
 				306ADAEB1AAA747100CAC885 /* NSMutableArray+QueueAdditions.h in Headers */,
 				306ADAEC1AAA753300CAC885 /* CDVCommandDelegateImpl.h in Headers */,
-				EBFF4DBD16D3FE2E008F452B /* CDVUIWebViewDelegate.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[33/50] [abbrv] ios commit: CB-8690 - Group files into folders in CordovaLib/Classes

Posted by ia...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVPlugin+Resources.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin+Resources.h b/CordovaLib/Classes/CDVPlugin+Resources.h
deleted file mode 100644
index cc43b16..0000000
--- a/CordovaLib/Classes/CDVPlugin+Resources.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <UIKit/UIKit.h>
-#import "CDVPlugin.h"
-
-@interface CDVPlugin (CDVPluginResources)
-
-/*
- This will return the localized string for a key in a .bundle that is named the same as your class
- For example, if your plugin class was called Foo, and you have a Spanish localized strings file, it will
- try to load the desired key from Foo.bundle/es.lproj/Localizable.strings
- */
-- (NSString*)pluginLocalizedString:(NSString*)key;
-
-/*
- This will return the image for a name in a .bundle that is named the same as your class
- For example, if your plugin class was called Foo, and you have an image called "bar",
- it will try to load the image from Foo.bundle/bar.png (and appropriately named retina versions)
- */
-- (UIImage*)pluginImageResource:(NSString*)name;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVPlugin+Resources.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin+Resources.m b/CordovaLib/Classes/CDVPlugin+Resources.m
deleted file mode 100644
index 5690738..0000000
--- a/CordovaLib/Classes/CDVPlugin+Resources.m
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVPlugin+Resources.h"
-
-@implementation CDVPlugin (CDVPluginResources)
-
-- (NSString*)pluginLocalizedString:(NSString*)key
-{
-    NSBundle* bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:NSStringFromClass([self class]) ofType:@"bundle"]];
-
-    return [bundle localizedStringForKey:(key) value:nil table:nil];
-}
-
-- (UIImage*)pluginImageResource:(NSString*)name
-{
-    NSString* resourceIdentifier = [NSString stringWithFormat:@"%@.bundle/%@", NSStringFromClass([self class]), name];
-
-    return [UIImage imageNamed:resourceIdentifier];
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin.h b/CordovaLib/Classes/CDVPlugin.h
deleted file mode 100644
index 54c8afd..0000000
--- a/CordovaLib/Classes/CDVPlugin.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-#import "CDVPluginResult.h"
-#import "NSMutableArray+QueueAdditions.h"
-#import "CDVCommandDelegate.h"
-#import "CDVWebViewEngineProtocol.h"
-
-@interface UIView (org_apache_cordova_UIView_Extension)
-
-@property (nonatomic, weak) UIScrollView* scrollView;
-
-@end
-
-extern NSString* const CDVPageDidLoadNotification;
-extern NSString* const CDVPluginHandleOpenURLNotification;
-extern NSString* const CDVPluginResetNotification;
-extern NSString* const CDVLocalNotification;
-extern NSString* const CDVRemoteNotification;
-extern NSString* const CDVRemoteNotificationError;
-
-@interface CDVPlugin : NSObject {}
-
-@property (nonatomic, readonly, weak) UIView* webView;
-@property (nonatomic, readonly, weak) id <CDVWebViewEngineProtocol> webViewEngine;
-
-@property (nonatomic, weak) UIViewController* viewController;
-@property (nonatomic, weak) id <CDVCommandDelegate> commandDelegate;
-
-@property (readonly, assign) BOOL hasPendingOperation;
-
-- (void)pluginInitialize;
-
-- (void)handleOpenURL:(NSNotification*)notification;
-- (void)onAppTerminate;
-- (void)onMemoryWarning;
-- (void)onReset;
-- (void)dispose;
-
-/*
- // see initWithWebView implementation
- - (void) onPause {}
- - (void) onResume {}
- - (void) onOrientationWillChange {}
- - (void) onOrientationDidChange {}
- - (void)didReceiveLocalNotification:(NSNotification *)notification;
- */
-
-- (id)appDelegate;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVPlugin.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin.m b/CordovaLib/Classes/CDVPlugin.m
deleted file mode 100644
index ac3a8ee..0000000
--- a/CordovaLib/Classes/CDVPlugin.m
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVPlugin.h"
-#import "CDVPlugin+Private.h"
-#import "CDVPlugin+Resources.h"
-#import "CDVViewController.h"
-#include <objc/message.h>
-
-@implementation UIView (org_apache_cordova_UIView_Extension)
-
-@dynamic scrollView;
-
-- (UIScrollView*)scrollView
-{
-    SEL scrollViewSelector = NSSelectorFromString(@"scrollView");
-
-    if ([self respondsToSelector:scrollViewSelector]) {
-        return ((id (*)(id, SEL))objc_msgSend)(self, scrollViewSelector);
-    }
-
-    return nil;
-}
-
-@end
-
-NSString* const CDVPageDidLoadNotification = @"CDVPageDidLoadNotification";
-NSString* const CDVPluginHandleOpenURLNotification = @"CDVPluginHandleOpenURLNotification";
-NSString* const CDVPluginResetNotification = @"CDVPluginResetNotification";
-NSString* const CDVLocalNotification = @"CDVLocalNotification";
-NSString* const CDVRemoteNotification = @"CDVRemoteNotification";
-NSString* const CDVRemoteNotificationError = @"CDVRemoteNotificationError";
-
-@interface CDVPlugin ()
-
-@property (readwrite, assign) BOOL hasPendingOperation;
-@property (nonatomic, readwrite, weak) id <CDVWebViewEngineProtocol> webViewEngine;
-
-@end
-
-@implementation CDVPlugin
-@synthesize webViewEngine, viewController, commandDelegate, hasPendingOperation;
-@dynamic webView;
-
-// Do not override these methods. Use pluginInitialize instead.
-- (instancetype)initWithWebViewEngine:(id <CDVWebViewEngineProtocol>)theWebViewEngine
-{
-    self = [super init];
-    if (self) {
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppTerminate) name:UIApplicationWillTerminateNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onMemoryWarning) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleOpenURL:) name:CDVPluginHandleOpenURLNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onReset) name:CDVPluginResetNotification object:theWebViewEngine.engineWebView];
-
-        self.webViewEngine = theWebViewEngine;
-    }
-    return self;
-}
-
-- (void)pluginInitialize
-{
-    // You can listen to more app notifications, see:
-    // http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006728-CH3-DontLinkElementID_4
-
-    // NOTE: if you want to use these, make sure you uncomment the corresponding notification handler
-
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil];
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil];
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationWillChange) name:UIApplicationWillChangeStatusBarOrientationNotification object:nil];
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationDidChange) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
-
-    // Added in 2.3.0
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveLocalNotification:) name:CDVLocalNotification object:nil];
-
-    // Added in 2.5.0
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad:) name:CDVPageDidLoadNotification object:self.webView];
-}
-
-- (void)dispose
-{
-    viewController = nil;
-    commandDelegate = nil;
-}
-
-- (UIView*)webView
-{
-    if (self.webViewEngine != nil) {
-        return self.webViewEngine.engineWebView;
-    }
-
-    return nil;
-}
-
-/*
-// NOTE: for onPause and onResume, calls into JavaScript must not call or trigger any blocking UI, like alerts
-- (void) onPause {}
-- (void) onResume {}
-- (void) onOrientationWillChange {}
-- (void) onOrientationDidChange {}
-*/
-
-/* NOTE: calls into JavaScript must not call or trigger any blocking UI, like alerts */
-- (void)handleOpenURL:(NSNotification*)notification
-{
-    // override to handle urls sent to your app
-    // register your url schemes in your App-Info.plist
-
-    NSURL* url = [notification object];
-
-    if ([url isKindOfClass:[NSURL class]]) {
-        /* Do your thing! */
-    }
-}
-
-/* NOTE: calls into JavaScript must not call or trigger any blocking UI, like alerts */
-- (void)onAppTerminate
-{
-    // override this if you need to do any cleanup on app exit
-}
-
-- (void)onMemoryWarning
-{
-    // override to remove caches, etc
-}
-
-- (void)onReset
-{
-    // Override to cancel any long-running requests when the WebView navigates or refreshes.
-}
-
-- (void)dealloc
-{
-    [[NSNotificationCenter defaultCenter] removeObserver:self];   // this will remove all notification unless added using addObserverForName:object:queue:usingBlock:
-}
-
-- (id)appDelegate
-{
-    return [[UIApplication sharedApplication] delegate];
-}
-
-// default implementation does nothing, ideally, we are not registered for notification if we aren't going to do anything.
-// - (void)didReceiveLocalNotification:(NSNotification *)notification
-// {
-//    // UILocalNotification* localNotification = [notification object]; // get the payload as a LocalNotification
-// }
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVPluginResult.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPluginResult.h b/CordovaLib/Classes/CDVPluginResult.h
deleted file mode 100644
index 7377b12..0000000
--- a/CordovaLib/Classes/CDVPluginResult.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-#import "CDVAvailability.h"
-
-typedef enum {
-    CDVCommandStatus_NO_RESULT = 0,
-    CDVCommandStatus_OK,
-    CDVCommandStatus_CLASS_NOT_FOUND_EXCEPTION,
-    CDVCommandStatus_ILLEGAL_ACCESS_EXCEPTION,
-    CDVCommandStatus_INSTANTIATION_EXCEPTION,
-    CDVCommandStatus_MALFORMED_URL_EXCEPTION,
-    CDVCommandStatus_IO_EXCEPTION,
-    CDVCommandStatus_INVALID_ACTION,
-    CDVCommandStatus_JSON_EXCEPTION,
-    CDVCommandStatus_ERROR
-} CDVCommandStatus;
-
-@interface CDVPluginResult : NSObject {}
-
-@property (nonatomic, strong, readonly) NSNumber* status;
-@property (nonatomic, strong, readonly) id message;
-@property (nonatomic, strong)           NSNumber* keepCallback;
-// This property can be used to scope the lifetime of another object. For example,
-// Use it to store the associated NSData when `message` is created using initWithBytesNoCopy.
-@property (nonatomic, strong) id associatedObject;
-
-- (CDVPluginResult*)init;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode;
-
-+ (void)setVerbose:(BOOL)verbose;
-+ (BOOL)isVerbose;
-
-- (void)setKeepCallbackAsBool:(BOOL)bKeepCallback;
-
-- (NSString*)argumentsAsJSON;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVPluginResult.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPluginResult.m b/CordovaLib/Classes/CDVPluginResult.m
deleted file mode 100644
index f200c04..0000000
--- a/CordovaLib/Classes/CDVPluginResult.m
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVPluginResult.h"
-#import "CDVJSON_private.h"
-#import "CDVDebug.h"
-#import "NSData+Base64.h"
-
-@interface CDVPluginResult ()
-
-- (CDVPluginResult*)initWithStatus:(CDVCommandStatus)statusOrdinal message:(id)theMessage;
-
-@end
-
-@implementation CDVPluginResult
-@synthesize status, message, keepCallback, associatedObject;
-
-static NSArray* org_apache_cordova_CommandStatusMsgs;
-
-id messageFromArrayBuffer(NSData* data)
-{
-    return @{
-               @"CDVType" : @"ArrayBuffer",
-               @"data" :[data cdv_base64EncodedString]
-    };
-}
-
-id massageMessage(id message)
-{
-    if ([message isKindOfClass:[NSData class]]) {
-        return messageFromArrayBuffer(message);
-    }
-    return message;
-}
-
-id messageFromMultipart(NSArray* theMessages)
-{
-    NSMutableArray* messages = [NSMutableArray arrayWithArray:theMessages];
-
-    for (NSUInteger i = 0; i < messages.count; ++i) {
-        [messages replaceObjectAtIndex:i withObject:massageMessage([messages objectAtIndex:i])];
-    }
-
-    return @{
-               @"CDVType" : @"MultiPart",
-               @"messages" : messages
-    };
-}
-
-+ (void)initialize
-{
-    org_apache_cordova_CommandStatusMsgs = [[NSArray alloc] initWithObjects:@"No result",
-        @"OK",
-        @"Class not found",
-        @"Illegal access",
-        @"Instantiation error",
-        @"Malformed url",
-        @"IO error",
-        @"Invalid action",
-        @"JSON error",
-        @"Error",
-        nil];
-}
-
-- (CDVPluginResult*)init
-{
-    return [self initWithStatus:CDVCommandStatus_NO_RESULT message:nil];
-}
-
-- (CDVPluginResult*)initWithStatus:(CDVCommandStatus)statusOrdinal message:(id)theMessage
-{
-    self = [super init];
-    if (self) {
-        status = [NSNumber numberWithInt:statusOrdinal];
-        message = theMessage;
-        keepCallback = [NSNumber numberWithBool:NO];
-    }
-    return self;
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:nil];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithInt:theMessage]];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithDouble:theMessage]];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithBool:theMessage]];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:messageFromArrayBuffer(theMessage)];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:messageFromMultipart(theMessages)];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode
-{
-    NSDictionary* errDict = @{@"code" :[NSNumber numberWithInt:errorCode]};
-
-    return [[self alloc] initWithStatus:statusOrdinal message:errDict];
-}
-
-- (void)setKeepCallbackAsBool:(BOOL)bKeepCallback
-{
-    [self setKeepCallback:[NSNumber numberWithBool:bKeepCallback]];
-}
-
-- (NSString*)argumentsAsJSON
-{
-    id arguments = (self.message == nil ? [NSNull null] : self.message);
-    NSArray* argumentsWrappedInArray = [NSArray arrayWithObject:arguments];
-
-    NSString* argumentsJSON = [argumentsWrappedInArray cdv_JSONString];
-
-    argumentsJSON = [argumentsJSON substringWithRange:NSMakeRange(1, [argumentsJSON length] - 2)];
-
-    return argumentsJSON;
-}
-
-static BOOL gIsVerbose = NO;
-+ (void)setVerbose:(BOOL)verbose
-{
-    gIsVerbose = verbose;
-}
-
-+ (BOOL)isVerbose
-{
-    return gIsVerbose;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVScreenOrientationDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVScreenOrientationDelegate.h b/CordovaLib/Classes/CDVScreenOrientationDelegate.h
deleted file mode 100644
index 7226205..0000000
--- a/CordovaLib/Classes/CDVScreenOrientationDelegate.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-@protocol CDVScreenOrientationDelegate <NSObject>
-
-- (NSUInteger)supportedInterfaceOrientations;
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
-- (BOOL)shouldAutorotate;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVTimer.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVTimer.h b/CordovaLib/Classes/CDVTimer.h
deleted file mode 100644
index 6d31593..0000000
--- a/CordovaLib/Classes/CDVTimer.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-@interface CDVTimer : NSObject
-
-+ (void)start:(NSString*)name;
-+ (void)stop:(NSString*)name;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVTimer.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVTimer.m b/CordovaLib/Classes/CDVTimer.m
deleted file mode 100644
index 784e94d..0000000
--- a/CordovaLib/Classes/CDVTimer.m
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVTimer.h"
-
-#pragma mark CDVTimerItem
-
-@interface CDVTimerItem : NSObject
-
-@property (nonatomic, strong) NSString* name;
-@property (nonatomic, strong) NSDate* started;
-@property (nonatomic, strong) NSDate* ended;
-
-- (void)log;
-
-@end
-
-@implementation CDVTimerItem
-
-- (void)log
-{
-    NSLog(@"[CDVTimer][%@] %fms", self.name, [self.ended timeIntervalSinceDate:self.started] * 1000.0);
-}
-
-@end
-
-#pragma mark CDVTimer
-
-@interface CDVTimer ()
-
-@property (nonatomic, strong) NSMutableDictionary* items;
-
-@end
-
-@implementation CDVTimer
-
-#pragma mark object methods
-
-- (id)init
-{
-    if (self = [super init]) {
-        self.items = [NSMutableDictionary dictionaryWithCapacity:6];
-    }
-
-    return self;
-}
-
-- (void)add:(NSString*)name
-{
-    if ([self.items objectForKey:[name lowercaseString]] == nil) {
-        CDVTimerItem* item = [CDVTimerItem new];
-        item.name = name;
-        item.started = [NSDate new];
-        [self.items setObject:item forKey:[name lowercaseString]];
-    } else {
-        NSLog(@"Timer called '%@' already exists.", name);
-    }
-}
-
-- (void)remove:(NSString*)name
-{
-    CDVTimerItem* item = [self.items objectForKey:[name lowercaseString]];
-
-    if (item != nil) {
-        item.ended = [NSDate new];
-        [item log];
-        [self.items removeObjectForKey:[name lowercaseString]];
-    } else {
-        NSLog(@"Timer called '%@' does not exist.", name);
-    }
-}
-
-- (void)removeAll
-{
-    [self.items removeAllObjects];
-}
-
-#pragma mark class methods
-
-+ (void)start:(NSString*)name
-{
-    [[CDVTimer sharedInstance] add:name];
-}
-
-+ (void)stop:(NSString*)name
-{
-    [[CDVTimer sharedInstance] remove:name];
-}
-
-+ (void)clearAll
-{
-    [[CDVTimer sharedInstance] removeAll];
-}
-
-+ (CDVTimer*)sharedInstance
-{
-    static dispatch_once_t pred = 0;
-    __strong static CDVTimer* _sharedObject = nil;
-
-    dispatch_once(&pred, ^{
-            _sharedObject = [[self alloc] init];
-        });
-
-    return _sharedObject;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVUIWebViewDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVUIWebViewDelegate.h b/CordovaLib/Classes/CDVUIWebViewDelegate.h
deleted file mode 100644
index d77f191..0000000
--- a/CordovaLib/Classes/CDVUIWebViewDelegate.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <UIKit/UIKit.h>
-#import "CDVAvailability.h"
-
-/**
- * Distinguishes top-level navigations from sub-frame navigations.
- * shouldStartLoadWithRequest is called for every request, but didStartLoad
- * and didFinishLoad is called only for top-level navigations.
- * Relevant bug: CB-2389
- */
-@interface CDVUIWebViewDelegate : NSObject <UIWebViewDelegate>{
-    __weak NSObject <UIWebViewDelegate>* _delegate;
-    NSInteger _loadCount;
-    NSInteger _state;
-    NSInteger _curLoadToken;
-    NSInteger _loadStartPollCount;
-}
-
-- (id)initWithDelegate:(NSObject <UIWebViewDelegate>*)delegate;
-
-- (BOOL)request:(NSURLRequest*)newRequest isEqualToRequestAfterStrippingFragments:(NSURLRequest*)originalRequest;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVUIWebViewDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVUIWebViewDelegate.m b/CordovaLib/Classes/CDVUIWebViewDelegate.m
deleted file mode 100644
index 01872f6..0000000
--- a/CordovaLib/Classes/CDVUIWebViewDelegate.m
+++ /dev/null
@@ -1,399 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-//
-// Testing shows:
-//
-// In all cases, webView.request.URL is the previous page's URL (or empty) during the didStartLoad callback.
-// When loading a page with a redirect:
-// 1. shouldStartLoading (requestURL is target page)
-// 2. didStartLoading
-// 3. shouldStartLoading (requestURL is redirect target)
-// 4. didFinishLoad (request.URL is redirect target)
-//
-// Note the lack of a second didStartLoading **
-//
-// When loading a page with iframes:
-// 1. shouldStartLoading (requestURL is main page)
-// 2. didStartLoading
-// 3. shouldStartLoading (requestURL is one of the iframes)
-// 4. didStartLoading
-// 5. didFinishLoad
-// 6. didFinishLoad
-//
-// Note there is no way to distinguish which didFinishLoad maps to which didStartLoad **
-//
-// Loading a page by calling window.history.go(-1):
-// 1. didStartLoading
-// 2. didFinishLoad
-//
-// Note the lack of a shouldStartLoading call **
-// Actually - this is fixed on iOS6. iOS6 has a shouldStart. **
-//
-// Loading a page by calling location.reload()
-// 1. shouldStartLoading
-// 2. didStartLoading
-// 3. didFinishLoad
-//
-// Loading a page with an iframe that fails to load:
-// 1. shouldStart (main page)
-// 2. didStart
-// 3. shouldStart (iframe)
-// 4. didStart
-// 5. didFailWithError
-// 6. didFinish
-//
-// Loading a page with an iframe that fails to load due to an invalid URL:
-// 1. shouldStart (main page)
-// 2. didStart
-// 3. shouldStart (iframe)
-// 5. didFailWithError
-// 6. didFinish
-//
-// This case breaks our logic since there is a missing didStart. To prevent this,
-// we check URLs in shouldStart and return NO if they are invalid.
-//
-// Loading a page with an invalid URL
-// 1. shouldStart (main page)
-// 2. didFailWithError
-//
-// TODO: Record order when page is re-navigated before the first navigation finishes.
-//
-
-#import "CDVUIWebViewDelegate.h"
-
-// #define VerboseLog NSLog
-#define VerboseLog(...) do { \
-} while (0)
-
-typedef enum {
-    STATE_IDLE = 0,
-    STATE_WAITING_FOR_LOAD_START = 1,
-    STATE_WAITING_FOR_LOAD_FINISH = 2,
-    STATE_IOS5_POLLING_FOR_LOAD_START = 3,
-    STATE_IOS5_POLLING_FOR_LOAD_FINISH = 4,
-    STATE_CANCELLED = 5
-} State;
-
-static NSString *stripFragment(NSString* url)
-{
-    NSRange r = [url rangeOfString:@"#"];
-
-    if (r.location == NSNotFound) {
-        return url;
-    }
-    return [url substringToIndex:r.location];
-}
-
-@implementation CDVUIWebViewDelegate
-
-- (id)initWithDelegate:(NSObject <UIWebViewDelegate>*)delegate
-{
-    self = [super init];
-    if (self != nil) {
-        _delegate = delegate;
-        _loadCount = -1;
-        _state = STATE_IDLE;
-    }
-    return self;
-}
-
-- (BOOL)request:(NSURLRequest*)newRequest isEqualToRequestAfterStrippingFragments:(NSURLRequest*)originalRequest
-{
-    if (originalRequest.URL && newRequest.URL) {
-        NSString* originalRequestUrl = [originalRequest.URL absoluteString];
-        NSString* newRequestUrl = [newRequest.URL absoluteString];
-
-        NSString* baseOriginalRequestUrl = stripFragment(originalRequestUrl);
-        NSString* baseNewRequestUrl = stripFragment(newRequestUrl);
-        return [baseOriginalRequestUrl isEqualToString:baseNewRequestUrl];
-    }
-
-    return NO;
-}
-
-- (BOOL)isPageLoaded:(UIWebView*)webView
-{
-    NSString* readyState = [webView stringByEvaluatingJavaScriptFromString:@"document.readyState"];
-
-    return [readyState isEqualToString:@"loaded"] || [readyState isEqualToString:@"complete"];
-}
-
-- (BOOL)isJsLoadTokenSet:(UIWebView*)webView
-{
-    NSString* loadToken = [webView stringByEvaluatingJavaScriptFromString:@"window.__cordovaLoadToken"];
-
-    return [[NSString stringWithFormat:@"%ld", (long)_curLoadToken] isEqualToString:loadToken];
-}
-
-- (void)setLoadToken:(UIWebView*)webView
-{
-    _curLoadToken += 1;
-    [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.__cordovaLoadToken=%ld", (long)_curLoadToken]];
-}
-
-- (NSString*)evalForCurrentURL:(UIWebView*)webView
-{
-    return [webView stringByEvaluatingJavaScriptFromString:@"location.href"];
-}
-
-- (void)pollForPageLoadStart:(UIWebView*)webView
-{
-    if (_state != STATE_IOS5_POLLING_FOR_LOAD_START) {
-        return;
-    }
-    if (![self isJsLoadTokenSet:webView]) {
-        VerboseLog(@"Polled for page load start. result = YES!");
-        _state = STATE_IOS5_POLLING_FOR_LOAD_FINISH;
-        [self setLoadToken:webView];
-        if ([_delegate respondsToSelector:@selector(webViewDidStartLoad:)]) {
-            [_delegate webViewDidStartLoad:webView];
-        }
-        [self pollForPageLoadFinish:webView];
-    } else {
-        VerboseLog(@"Polled for page load start. result = NO");
-        // Poll only for 1 second, and then fall back on checking only when delegate methods are called.
-        ++_loadStartPollCount;
-        if (_loadStartPollCount < (1000 * .05)) {
-            [self performSelector:@selector(pollForPageLoadStart:) withObject:webView afterDelay:.05];
-        }
-    }
-}
-
-- (void)pollForPageLoadFinish:(UIWebView*)webView
-{
-    if (_state != STATE_IOS5_POLLING_FOR_LOAD_FINISH) {
-        return;
-    }
-    if ([self isPageLoaded:webView]) {
-        VerboseLog(@"Polled for page load finish. result = YES!");
-        _state = STATE_IDLE;
-        if ([_delegate respondsToSelector:@selector(webViewDidFinishLoad:)]) {
-            [_delegate webViewDidFinishLoad:webView];
-        }
-    } else {
-        VerboseLog(@"Polled for page load finish. result = NO");
-        [self performSelector:@selector(pollForPageLoadFinish:) withObject:webView afterDelay:.05];
-    }
-}
-
-- (BOOL)shouldLoadRequest:(NSURLRequest*)request
-{
-    NSString* scheme = [[request URL] scheme];
-
-    if ([scheme isEqualToString:@"mailto"] || [scheme isEqualToString:@"tel"]) {
-        return YES;
-    }
-
-    return [NSURLConnection canHandleRequest:request];
-}
-
-- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
-{
-    BOOL shouldLoad = YES;
-
-    if ([_delegate respondsToSelector:@selector(webView:shouldStartLoadWithRequest:navigationType:)]) {
-        shouldLoad = [_delegate webView:webView shouldStartLoadWithRequest:request navigationType:navigationType];
-    }
-
-    VerboseLog(@"webView shouldLoad=%d (before) state=%d loadCount=%d URL=%@", shouldLoad, _state, _loadCount, request.URL);
-
-    if (shouldLoad) {
-        // When devtools refresh occurs, it blindly uses the same request object. If a history.replaceState() has occured, then
-        // mainDocumentURL != URL even though it's a top-level navigation.
-        BOOL isDevToolsRefresh = (request == webView.request);
-        BOOL isTopLevelNavigation = isDevToolsRefresh || [request.URL isEqual:[request mainDocumentURL]];
-        if (isTopLevelNavigation) {
-            // Ignore hash changes that don't navigate to a different page.
-            // webView.request does actually update when history.replaceState() gets called.
-            if ([self request:request isEqualToRequestAfterStrippingFragments:webView.request]) {
-                NSString* prevURL = [self evalForCurrentURL:webView];
-                if ([prevURL isEqualToString:[request.URL absoluteString]]) {
-                    VerboseLog(@"Page reload detected.");
-                } else {
-                    VerboseLog(@"Detected hash change shouldLoad");
-                    return shouldLoad;
-                }
-            }
-
-            switch (_state) {
-                case STATE_WAITING_FOR_LOAD_FINISH:
-                    // Redirect case.
-                    // We expect loadCount == 1.
-                    if (_loadCount != 1) {
-                        NSLog(@"CDVWebViewDelegate: Detected redirect when loadCount=%ld", (long)_loadCount);
-                    }
-                    break;
-
-                case STATE_IDLE:
-                case STATE_IOS5_POLLING_FOR_LOAD_START:
-                case STATE_CANCELLED:
-                    // Page navigation start.
-                    _loadCount = 0;
-                    _state = STATE_WAITING_FOR_LOAD_START;
-                    break;
-
-                default:
-                    {
-                        _loadCount = 0;
-                        _state = STATE_WAITING_FOR_LOAD_START;
-                        NSString* description = [NSString stringWithFormat:@"CDVWebViewDelegate: Navigation started when state=%ld", (long)_state];
-                        NSLog(@"%@", description);
-                        if ([_delegate respondsToSelector:@selector(webView:didFailLoadWithError:)]) {
-                            NSDictionary* errorDictionary = @{NSLocalizedDescriptionKey : description};
-                            NSError* error = [[NSError alloc] initWithDomain:@"CDVUIWebViewDelegate" code:1 userInfo:errorDictionary];
-                            [_delegate webView:webView didFailLoadWithError:error];
-                        }
-                    }
-            }
-        } else {
-            // Deny invalid URLs so that we don't get the case where we go straight from
-            // webViewShouldLoad -> webViewDidFailLoad (messes up _loadCount).
-            shouldLoad = shouldLoad && [self shouldLoadRequest:request];
-        }
-        VerboseLog(@"webView shouldLoad=%d (after) isTopLevelNavigation=%d state=%d loadCount=%d", shouldLoad, isTopLevelNavigation, _state, _loadCount);
-    }
-    return shouldLoad;
-}
-
-- (void)webViewDidStartLoad:(UIWebView*)webView
-{
-    VerboseLog(@"webView didStartLoad (before). state=%d loadCount=%d", _state, _loadCount);
-    BOOL fireCallback = NO;
-    switch (_state) {
-        case STATE_IDLE:
-            break;
-
-        case STATE_CANCELLED:
-            fireCallback = YES;
-            _state = STATE_WAITING_FOR_LOAD_FINISH;
-            _loadCount += 1;
-            break;
-
-        case STATE_WAITING_FOR_LOAD_START:
-            if (_loadCount != 0) {
-                NSLog(@"CDVWebViewDelegate: Unexpected loadCount in didStart. count=%ld", (long)_loadCount);
-            }
-            fireCallback = YES;
-            _state = STATE_WAITING_FOR_LOAD_FINISH;
-            _loadCount = 1;
-            break;
-
-        case STATE_WAITING_FOR_LOAD_FINISH:
-            _loadCount += 1;
-            break;
-
-        case STATE_IOS5_POLLING_FOR_LOAD_START:
-            [self pollForPageLoadStart:webView];
-            break;
-
-        case STATE_IOS5_POLLING_FOR_LOAD_FINISH:
-            [self pollForPageLoadFinish:webView];
-            break;
-
-        default:
-            NSLog(@"CDVWebViewDelegate: Unexpected didStart with state=%ld loadCount=%ld", (long)_state, (long)_loadCount);
-    }
-    VerboseLog(@"webView didStartLoad (after). state=%d loadCount=%d fireCallback=%d", _state, _loadCount, fireCallback);
-    if (fireCallback && [_delegate respondsToSelector:@selector(webViewDidStartLoad:)]) {
-        [_delegate webViewDidStartLoad:webView];
-    }
-}
-
-- (void)webViewDidFinishLoad:(UIWebView*)webView
-{
-    VerboseLog(@"webView didFinishLoad (before). state=%d loadCount=%d", _state, _loadCount);
-    BOOL fireCallback = NO;
-    switch (_state) {
-        case STATE_IDLE:
-            break;
-
-        case STATE_WAITING_FOR_LOAD_START:
-            NSLog(@"CDVWebViewDelegate: Unexpected didFinish while waiting for load start.");
-            break;
-
-        case STATE_WAITING_FOR_LOAD_FINISH:
-            if (_loadCount == 1) {
-                fireCallback = YES;
-                _state = STATE_IDLE;
-            }
-            _loadCount -= 1;
-            break;
-
-        case STATE_IOS5_POLLING_FOR_LOAD_START:
-            [self pollForPageLoadStart:webView];
-            break;
-
-        case STATE_IOS5_POLLING_FOR_LOAD_FINISH:
-            [self pollForPageLoadFinish:webView];
-            break;
-    }
-    VerboseLog(@"webView didFinishLoad (after). state=%d loadCount=%d fireCallback=%d", _state, _loadCount, fireCallback);
-    if (fireCallback && [_delegate respondsToSelector:@selector(webViewDidFinishLoad:)]) {
-        [_delegate webViewDidFinishLoad:webView];
-    }
-}
-
-- (void)webView:(UIWebView*)webView didFailLoadWithError:(NSError*)error
-{
-    VerboseLog(@"webView didFailLoad (before). state=%d loadCount=%d", _state, _loadCount);
-    BOOL fireCallback = NO;
-
-    switch (_state) {
-        case STATE_IDLE:
-            break;
-
-        case STATE_WAITING_FOR_LOAD_START:
-            if ([error code] == NSURLErrorCancelled) {
-                _state = STATE_CANCELLED;
-            } else {
-                _state = STATE_IDLE;
-            }
-            fireCallback = YES;
-            break;
-
-        case STATE_WAITING_FOR_LOAD_FINISH:
-            if ([error code] != NSURLErrorCancelled) {
-                if (_loadCount == 1) {
-                    _state = STATE_IDLE;
-                    fireCallback = YES;
-                }
-                _loadCount = -1;
-            } else {
-                fireCallback = YES;
-                _state = STATE_CANCELLED;
-                _loadCount -= 1;
-            }
-            break;
-
-        case STATE_IOS5_POLLING_FOR_LOAD_START:
-            [self pollForPageLoadStart:webView];
-            break;
-
-        case STATE_IOS5_POLLING_FOR_LOAD_FINISH:
-            [self pollForPageLoadFinish:webView];
-            break;
-    }
-    VerboseLog(@"webView didFailLoad (after). state=%d loadCount=%d, fireCallback=%d", _state, _loadCount, fireCallback);
-    if (fireCallback && [_delegate respondsToSelector:@selector(webView:didFailLoadWithError:)]) {
-        [_delegate webView:webView didFailLoadWithError:error];
-    }
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVUIWebViewEngine.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVUIWebViewEngine.h b/CordovaLib/Classes/CDVUIWebViewEngine.h
deleted file mode 100644
index 6a9ee77..0000000
--- a/CordovaLib/Classes/CDVUIWebViewEngine.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVPlugin.h"
-#import "CDVWebViewEngineProtocol.h"
-
-@interface CDVUIWebViewEngine : CDVPlugin <CDVWebViewEngineProtocol>
-
-@property (nonatomic, strong, readonly) id <UIWebViewDelegate> uiWebViewDelegate;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVUIWebViewEngine.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVUIWebViewEngine.m b/CordovaLib/Classes/CDVUIWebViewEngine.m
deleted file mode 100644
index 3e01b08..0000000
--- a/CordovaLib/Classes/CDVUIWebViewEngine.m
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVUIWebViewEngine.h"
-#import "CDVUIWebViewDelegate.h"
-#import "NSDictionary+CordovaPreferences.h"
-
-#import <objc/message.h>
-
-@interface CDVUIWebViewEngine ()
-
-@property (nonatomic, strong, readwrite) UIView* engineWebView;
-@property (nonatomic, strong, readwrite) id <UIWebViewDelegate> uiWebViewDelegate;
-
-@end
-
-@implementation CDVUIWebViewEngine
-
-@synthesize engineWebView = _engineWebView;
-
-- (instancetype)initWithFrame:(CGRect)frame
-{
-    self = [super init];
-    if (self) {
-        self.engineWebView = [[UIWebView alloc] initWithFrame:frame];
-        NSLog(@"Using UIWebView");
-    }
-
-    return self;
-}
-
-- (void)pluginInitialize
-{
-    // viewController would be available now. we attempt to set all possible delegates to it, by default
-
-    UIWebView* uiWebView = (UIWebView*)_engineWebView;
-
-    if ([self.viewController conformsToProtocol:@protocol(UIWebViewDelegate)]) {
-        self.uiWebViewDelegate = [[CDVUIWebViewDelegate alloc] initWithDelegate:(id <UIWebViewDelegate>)self.viewController];
-        uiWebView.delegate = self.uiWebViewDelegate;
-    }
-
-    [self updateSettings:self.commandDelegate.settings];
-}
-
-- (void)evaluateJavaScript:(NSString*)javaScriptString completionHandler:(void (^)(id, NSError*))completionHandler
-{
-    NSString* ret = [(UIWebView*)_engineWebView stringByEvaluatingJavaScriptFromString:javaScriptString];
-
-    if (completionHandler) {
-        completionHandler(ret, nil);
-    }
-}
-
-- (id)loadRequest:(NSURLRequest*)request
-{
-    [(UIWebView*)_engineWebView loadRequest:request];
-    return nil;
-}
-
-- (id)loadHTMLString:(NSString*)string baseURL:(NSURL*)baseURL
-{
-    [(UIWebView*)_engineWebView loadHTMLString:string baseURL:baseURL];
-    return nil;
-}
-
-- (NSURL*)URL
-{
-    return [[(UIWebView*)_engineWebView request] URL];
-}
-
-- (void)updateSettings:(NSDictionary*)settings
-{
-    UIWebView* uiWebView = (UIWebView*)_engineWebView;
-
-    uiWebView.scalesPageToFit = [settings cordovaBoolSettingForKey:@"EnableViewportScale" defaultValue:NO];
-    uiWebView.allowsInlineMediaPlayback = [settings cordovaBoolSettingForKey:@"AllowInlineMediaPlayback" defaultValue:NO];
-    uiWebView.mediaPlaybackRequiresUserAction = [settings cordovaBoolSettingForKey:@"MediaPlaybackRequiresUserAction" defaultValue:YES];
-    uiWebView.mediaPlaybackAllowsAirPlay = [settings cordovaBoolSettingForKey:@"MediaPlaybackAllowsAirPlay" defaultValue:YES];
-    uiWebView.keyboardDisplayRequiresUserAction = [settings cordovaBoolSettingForKey:@"KeyboardDisplayRequiresUserAction" defaultValue:YES];
-    uiWebView.suppressesIncrementalRendering = [settings cordovaBoolSettingForKey:@"SuppressesIncrementalRendering" defaultValue:NO];
-    uiWebView.gapBetweenPages = [settings cordovaFloatSettingForKey:@"GapBetweenPages" defaultValue:0.0];
-    uiWebView.pageLength = [settings cordovaFloatSettingForKey:@"PageLength" defaultValue:0.0];
-
-    id prefObj = nil;
-
-    // By default, DisallowOverscroll is false (thus bounce is allowed)
-    BOOL bounceAllowed = !([settings cordovaBoolSettingForKey:@"DisallowOverscroll" defaultValue:NO]);
-
-    // prevent webView from bouncing
-    if (!bounceAllowed) {
-        if ([self.webView respondsToSelector:@selector(scrollView)]) {
-            ((UIScrollView*)[uiWebView scrollView]).bounces = NO;
-        } else {
-            for (id subview in self.webView.subviews) {
-                if ([[subview class] isSubclassOfClass:[UIScrollView class]]) {
-                    ((UIScrollView*)subview).bounces = NO;
-                }
-            }
-        }
-    }
-
-    NSString* decelerationSetting = [settings cordovaSettingForKey:@"UIWebViewDecelerationSpeed"];
-    if (![@"fast" isEqualToString:decelerationSetting]) {
-        [uiWebView.scrollView setDecelerationRate:UIScrollViewDecelerationRateNormal];
-    }
-
-    NSInteger paginationBreakingMode = 0; // default - UIWebPaginationBreakingModePage
-    prefObj = [settings cordovaSettingForKey:@"PaginationBreakingMode"];
-    if (prefObj != nil) {
-        NSArray* validValues = @[@"page", @"column"];
-        NSString* prefValue = [validValues objectAtIndex:0];
-
-        if ([prefObj isKindOfClass:[NSString class]]) {
-            prefValue = prefObj;
-        }
-
-        paginationBreakingMode = [validValues indexOfObject:[prefValue lowercaseString]];
-        if (paginationBreakingMode == NSNotFound) {
-            paginationBreakingMode = 0;
-        }
-    }
-    uiWebView.paginationBreakingMode = paginationBreakingMode;
-
-    NSInteger paginationMode = 0; // default - UIWebPaginationModeUnpaginated
-    prefObj = [settings cordovaSettingForKey:@"PaginationMode"];
-    if (prefObj != nil) {
-        NSArray* validValues = @[@"unpaginated", @"lefttoright", @"toptobottom", @"bottomtotop", @"righttoleft"];
-        NSString* prefValue = [validValues objectAtIndex:0];
-
-        if ([prefObj isKindOfClass:[NSString class]]) {
-            prefValue = prefObj;
-        }
-
-        paginationMode = [validValues indexOfObject:[prefValue lowercaseString]];
-        if (paginationMode == NSNotFound) {
-            paginationMode = 0;
-        }
-    }
-    uiWebView.paginationMode = paginationMode;
-}
-
-- (void)updateWithInfo:(NSDictionary*)info
-{
-    UIWebView* uiWebView = (UIWebView*)_engineWebView;
-
-    id <UIWebViewDelegate> uiWebViewDelegate = [info objectForKey:kCDVWebViewEngineUIWebViewDelegate];
-    NSDictionary* settings = [info objectForKey:kCDVWebViewEngineWebViewPreferences];
-
-    if (uiWebViewDelegate &&
-        [uiWebViewDelegate conformsToProtocol:@protocol(UIWebViewDelegate)]) {
-        self.uiWebViewDelegate = [[CDVUIWebViewDelegate alloc] initWithDelegate:(id <UIWebViewDelegate>)self.viewController];
-        uiWebView.delegate = self.uiWebViewDelegate;
-    }
-
-    if (settings && [settings isKindOfClass:[NSDictionary class]]) {
-        [self updateSettings:settings];
-    }
-}
-
-// This forwards the methods that are in the header that are not implemented here.
-// Both WKWebView and UIWebView implement the below:
-//     loadHTMLString:baseURL:
-//     loadRequest:
-- (id)forwardingTargetForSelector:(SEL)aSelector
-{
-    return _engineWebView;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVURLProtocol.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVURLProtocol.h b/CordovaLib/Classes/CDVURLProtocol.h
deleted file mode 100644
index 5444f6d..0000000
--- a/CordovaLib/Classes/CDVURLProtocol.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-#import "CDVAvailability.h"
-
-@class CDVViewController;
-
-@interface CDVURLProtocol : NSURLProtocol {}
-
-+ (void)registerViewController:(CDVViewController*)viewController;
-+ (void)unregisterViewController:(CDVViewController*)viewController;
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVURLProtocol.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVURLProtocol.m b/CordovaLib/Classes/CDVURLProtocol.m
deleted file mode 100644
index fce5783..0000000
--- a/CordovaLib/Classes/CDVURLProtocol.m
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <AssetsLibrary/ALAsset.h>
-#import <AssetsLibrary/ALAssetRepresentation.h>
-#import <AssetsLibrary/ALAssetsLibrary.h>
-#import <MobileCoreServices/MobileCoreServices.h>
-#import "CDVURLProtocol.h"
-#import "CDVCommandQueue.h"
-#import "CDVWhitelist.h"
-#import "CDVViewController.h"
-
-static CDVWhitelist* gWhitelist = nil;
-// Contains a set of NSNumbers of addresses of controllers. It doesn't store
-// the actual pointer to avoid retaining.
-static NSMutableSet* gRegisteredControllers = nil;
-
-NSString* const kCDVAssetsLibraryPrefixes = @"assets-library://";
-
-// Returns the registered view controller that sent the given request.
-// If the user-agent is not from a UIWebView, or if it's from an unregistered one,
-// then nil is returned.
-static CDVViewController *viewControllerForRequest(NSURLRequest* request)
-{
-    // The exec bridge explicitly sets the VC address in a header.
-    // This works around the User-Agent not being set for file: URLs.
-    NSString* addrString = [request valueForHTTPHeaderField:@"vc"];
-
-    if (addrString == nil) {
-        NSString* userAgent = [request valueForHTTPHeaderField:@"User-Agent"];
-        if (userAgent == nil) {
-            return nil;
-        }
-        NSUInteger bracketLocation = [userAgent rangeOfString:@"(" options:NSBackwardsSearch].location;
-        if (bracketLocation == NSNotFound) {
-            return nil;
-        }
-        addrString = [userAgent substringFromIndex:bracketLocation + 1];
-    }
-
-    long long viewControllerAddress = [addrString longLongValue];
-    @synchronized(gRegisteredControllers) {
-        if (![gRegisteredControllers containsObject:[NSNumber numberWithLongLong:viewControllerAddress]]) {
-            return nil;
-        }
-    }
-
-    return (__bridge CDVViewController*)(void*)viewControllerAddress;
-}
-
-@implementation CDVURLProtocol
-
-+ (void)registerPGHttpURLProtocol {}
-
-+ (void)registerURLProtocol {}
-
-// Called to register the URLProtocol, and to make it away of an instance of
-// a ViewController.
-+ (void)registerViewController:(CDVViewController*)viewController
-{
-    if (gRegisteredControllers == nil) {
-        [NSURLProtocol registerClass:[CDVURLProtocol class]];
-        gRegisteredControllers = [[NSMutableSet alloc] initWithCapacity:8];
-        // The whitelist doesn't change, so grab the first one and store it.
-        gWhitelist = viewController.whitelist;
-
-        // Note that we grab the whitelist from the first viewcontroller for now - but this will change
-        // when we allow a registered viewcontroller to have its own whitelist (e.g InAppBrowser)
-        // Differentiating the requests will be through the 'vc' http header below as used for the js->objc bridge.
-        //  The 'vc' value is generated by casting the viewcontroller object to a (long long) value (see CDVViewController::webViewDidFinishLoad)
-        if (gWhitelist == nil) {
-            NSLog(@"WARNING: NO whitelist has been set in CDVURLProtocol.");
-        }
-    }
-
-    @synchronized(gRegisteredControllers) {
-        [gRegisteredControllers addObject:[NSNumber numberWithLongLong:(long long)viewController]];
-    }
-}
-
-+ (void)unregisterViewController:(CDVViewController*)viewController
-{
-    @synchronized(gRegisteredControllers) {
-        [gRegisteredControllers removeObject:[NSNumber numberWithLongLong:(long long)viewController]];
-    }
-}
-
-+ (BOOL)canInitWithRequest:(NSURLRequest*)theRequest
-{
-    NSURL* theUrl = [theRequest URL];
-    CDVViewController* viewController = viewControllerForRequest(theRequest);
-
-    if ([[theUrl absoluteString] hasPrefix:kCDVAssetsLibraryPrefixes]) {
-        return YES;
-    } else if (viewController != nil) {
-        if ([[theUrl path] isEqualToString:@"/!gap_exec"]) {
-            NSString* queuedCommandsJSON = [theRequest valueForHTTPHeaderField:@"cmds"];
-            NSString* requestId = [theRequest valueForHTTPHeaderField:@"rc"];
-            if (requestId == nil) {
-                NSLog(@"!cordova request missing rc header");
-                return NO;
-            }
-            BOOL hasCmds = [queuedCommandsJSON length] > 0;
-            if (hasCmds) {
-                SEL sel = @selector(enqueueCommandBatch:);
-                [viewController.commandQueue performSelectorOnMainThread:sel withObject:queuedCommandsJSON waitUntilDone:NO];
-                [viewController.commandQueue performSelectorOnMainThread:@selector(executePending) withObject:nil waitUntilDone:NO];
-            } else {
-                SEL sel = @selector(processXhrExecBridgePoke:);
-                [viewController.commandQueue performSelectorOnMainThread:sel withObject:[NSNumber numberWithInteger:[requestId integerValue]] waitUntilDone:NO];
-            }
-            // Returning NO here would be 20% faster, but it spams WebInspector's console with failure messages.
-            // If JS->Native bridge speed is really important for an app, they should use the iframe bridge.
-            // Returning YES here causes the request to come through canInitWithRequest two more times.
-            // For this reason, we return NO when cmds exist.
-            return !hasCmds;
-        }
-        // we only care about http and https connections.
-        // CORS takes care of http: trying to access file: URLs.
-        if ([gWhitelist schemeIsAllowed:[theUrl scheme]]) {
-            // if it FAILS the whitelist, we return TRUE, so we can fail the connection later
-            return ![gWhitelist URLIsAllowed:theUrl];
-        }
-    }
-
-    return NO;
-}
-
-+ (NSURLRequest*)canonicalRequestForRequest:(NSURLRequest*)request
-{
-    // NSLog(@"%@ received %@", self, NSStringFromSelector(_cmd));
-    return request;
-}
-
-- (void)startLoading
-{
-    // NSLog(@"%@ received %@ - start", self, NSStringFromSelector(_cmd));
-    NSURL* url = [[self request] URL];
-
-    if ([[url path] isEqualToString:@"/!gap_exec"]) {
-        [self sendResponseWithResponseCode:200 data:nil mimeType:nil];
-        return;
-    } else if ([[url absoluteString] hasPrefix:kCDVAssetsLibraryPrefixes]) {
-        ALAssetsLibraryAssetForURLResultBlock resultBlock = ^(ALAsset* asset) {
-            if (asset) {
-                // We have the asset!  Get the data and send it along.
-                ALAssetRepresentation* assetRepresentation = [asset defaultRepresentation];
-                NSString* MIMEType = (__bridge_transfer NSString*)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)[assetRepresentation UTI], kUTTagClassMIMEType);
-                Byte* buffer = (Byte*)malloc((unsigned long)[assetRepresentation size]);
-                NSUInteger bufferSize = [assetRepresentation getBytes:buffer fromOffset:0.0 length:(NSUInteger)[assetRepresentation size] error:nil];
-                NSData* data = [NSData dataWithBytesNoCopy:buffer length:bufferSize freeWhenDone:YES];
-                [self sendResponseWithResponseCode:200 data:data mimeType:MIMEType];
-            } else {
-                // Retrieving the asset failed for some reason.  Send an error.
-                [self sendResponseWithResponseCode:404 data:nil mimeType:nil];
-            }
-        };
-        ALAssetsLibraryAccessFailureBlock failureBlock = ^(NSError* error) {
-            // Retrieving the asset failed for some reason.  Send an error.
-            [self sendResponseWithResponseCode:401 data:nil mimeType:nil];
-        };
-
-        ALAssetsLibrary* assetsLibrary = [[ALAssetsLibrary alloc] init];
-        [assetsLibrary assetForURL:url resultBlock:resultBlock failureBlock:failureBlock];
-        return;
-    }
-
-    NSString* body = [gWhitelist errorStringForURL:url];
-    [self sendResponseWithResponseCode:401 data:[body dataUsingEncoding:NSASCIIStringEncoding] mimeType:nil];
-}
-
-- (void)stopLoading
-{
-    // do any cleanup here
-}
-
-+ (BOOL)requestIsCacheEquivalent:(NSURLRequest*)requestA toRequest:(NSURLRequest*)requestB
-{
-    return NO;
-}
-
-- (void)sendResponseWithResponseCode:(NSInteger)statusCode data:(NSData*)data mimeType:(NSString*)mimeType
-{
-    if (mimeType == nil) {
-        mimeType = @"text/plain";
-    }
-
-    NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[[self request] URL] statusCode:statusCode HTTPVersion:@"HTTP/1.1" headerFields:@{@"Content-Type" : mimeType}];
-
-    [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed];
-    if (data != nil) {
-        [[self client] URLProtocol:self didLoadData:data];
-    }
-    [[self client] URLProtocolDidFinishLoading:self];
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVUserAgentUtil.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVUserAgentUtil.h b/CordovaLib/Classes/CDVUserAgentUtil.h
deleted file mode 100644
index 4de382f..0000000
--- a/CordovaLib/Classes/CDVUserAgentUtil.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-@interface CDVUserAgentUtil : NSObject
-+ (NSString*)originalUserAgent;
-+ (void)acquireLock:(void (^)(NSInteger lockToken))block;
-+ (void)releaseLock:(NSInteger*)lockToken;
-+ (void)setUserAgent:(NSString*)value lockToken:(NSInteger)lockToken;
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVUserAgentUtil.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVUserAgentUtil.m b/CordovaLib/Classes/CDVUserAgentUtil.m
deleted file mode 100644
index c3402d0..0000000
--- a/CordovaLib/Classes/CDVUserAgentUtil.m
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVUserAgentUtil.h"
-
-#import <UIKit/UIKit.h>
-
-// #define VerboseLog NSLog
-#define VerboseLog(...) do {} while (0)
-
-static NSString* const kCdvUserAgentKey = @"Cordova-User-Agent";
-static NSString* const kCdvUserAgentVersionKey = @"Cordova-User-Agent-Version";
-
-static NSString* gOriginalUserAgent = nil;
-static NSInteger gNextLockToken = 0;
-static NSInteger gCurrentLockToken = 0;
-static NSMutableArray* gPendingSetUserAgentBlocks = nil;
-
-@implementation CDVUserAgentUtil
-
-+ (NSString*)originalUserAgent
-{
-    if (gOriginalUserAgent == nil) {
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppLocaleDidChange:)
-                                                     name:NSCurrentLocaleDidChangeNotification object:nil];
-
-        NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
-        NSString* systemVersion = [[UIDevice currentDevice] systemVersion];
-        NSString* localeStr = [[NSLocale currentLocale] localeIdentifier];
-        // Record the model since simulator can change it without re-install (CB-5420).
-        NSString* model = [UIDevice currentDevice].model;
-        NSString* systemAndLocale = [NSString stringWithFormat:@"%@ %@ %@", model, systemVersion, localeStr];
-
-        NSString* cordovaUserAgentVersion = [userDefaults stringForKey:kCdvUserAgentVersionKey];
-        gOriginalUserAgent = [userDefaults stringForKey:kCdvUserAgentKey];
-        BOOL cachedValueIsOld = ![systemAndLocale isEqualToString:cordovaUserAgentVersion];
-
-        if ((gOriginalUserAgent == nil) || cachedValueIsOld) {
-            UIWebView* sampleWebView = [[UIWebView alloc] initWithFrame:CGRectZero];
-            gOriginalUserAgent = [sampleWebView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
-
-            [userDefaults setObject:gOriginalUserAgent forKey:kCdvUserAgentKey];
-            [userDefaults setObject:systemAndLocale forKey:kCdvUserAgentVersionKey];
-
-            [userDefaults synchronize];
-        }
-    }
-    return gOriginalUserAgent;
-}
-
-+ (void)onAppLocaleDidChange:(NSNotification*)notification
-{
-    // TODO: We should figure out how to update the user-agent of existing UIWebViews when this happens.
-    // Maybe use the PDF bug (noted in setUserAgent:).
-    gOriginalUserAgent = nil;
-}
-
-+ (void)acquireLock:(void (^)(NSInteger lockToken))block
-{
-    if (gCurrentLockToken == 0) {
-        gCurrentLockToken = ++gNextLockToken;
-        VerboseLog(@"Gave lock %d", gCurrentLockToken);
-        block(gCurrentLockToken);
-    } else {
-        if (gPendingSetUserAgentBlocks == nil) {
-            gPendingSetUserAgentBlocks = [[NSMutableArray alloc] initWithCapacity:4];
-        }
-        VerboseLog(@"Waiting for lock");
-        [gPendingSetUserAgentBlocks addObject:block];
-    }
-}
-
-+ (void)releaseLock:(NSInteger*)lockToken
-{
-    if (*lockToken == 0) {
-        return;
-    }
-    NSAssert(gCurrentLockToken == *lockToken, @"Got token %ld, expected %ld", (long)*lockToken, (long)gCurrentLockToken);
-
-    VerboseLog(@"Released lock %d", *lockToken);
-    if ([gPendingSetUserAgentBlocks count] > 0) {
-        void (^block)() = [gPendingSetUserAgentBlocks objectAtIndex:0];
-        [gPendingSetUserAgentBlocks removeObjectAtIndex:0];
-        gCurrentLockToken = ++gNextLockToken;
-        NSLog(@"Gave lock %ld", (long)gCurrentLockToken);
-        block(gCurrentLockToken);
-    } else {
-        gCurrentLockToken = 0;
-    }
-    *lockToken = 0;
-}
-
-+ (void)setUserAgent:(NSString*)value lockToken:(NSInteger)lockToken
-{
-    NSAssert(gCurrentLockToken == lockToken, @"Got token %ld, expected %ld", (long)lockToken, (long)gCurrentLockToken);
-    VerboseLog(@"User-Agent set to: %@", value);
-
-    // Setting the UserAgent must occur before a UIWebView is instantiated.
-    // It is read per instantiation, so it does not affect previously created views.
-    // Except! When a PDF is loaded, all currently active UIWebViews reload their
-    // User-Agent from the NSUserDefaults some time after the DidFinishLoad of the PDF bah!
-    NSDictionary* dict = [[NSDictionary alloc] initWithObjectsAndKeys:value, @"UserAgent", nil];
-    [[NSUserDefaults standardUserDefaults] registerDefaults:dict];
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.h b/CordovaLib/Classes/CDVViewController.h
deleted file mode 100644
index e3ead2f..0000000
--- a/CordovaLib/Classes/CDVViewController.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <UIKit/UIKit.h>
-#import <Foundation/NSJSONSerialization.h>
-#import "CDVAvailability.h"
-#import "CDVInvokedUrlCommand.h"
-#import "CDVCommandDelegate.h"
-#import "CDVCommandQueue.h"
-#import "CDVWhitelist.h"
-#import "CDVScreenOrientationDelegate.h"
-#import "CDVPlugin.h"
-#import "CDVWebViewEngineProtocol.h"
-
-@interface CDVViewController : UIViewController <UIWebViewDelegate, CDVScreenOrientationDelegate>{
-    @protected
-    id <CDVWebViewEngineProtocol> _webViewEngine;
-    @protected
-    id <CDVCommandDelegate> _commandDelegate;
-    @protected
-    CDVCommandQueue* _commandQueue;
-    NSString* _userAgent;
-}
-
-@property (nonatomic, readonly, weak) IBOutlet UIView* webView;
-
-@property (nonatomic, readonly, strong) NSMutableDictionary* pluginObjects;
-@property (nonatomic, readonly, strong) NSDictionary* pluginsMap;
-@property (nonatomic, readonly, strong) NSMutableDictionary* settings;
-@property (nonatomic, readonly, strong) NSXMLParser* configParser;
-@property (nonatomic, readonly, strong) CDVWhitelist* whitelist; // readonly for public
-@property (nonatomic, readonly, assign) BOOL loadFromString;
-
-@property (nonatomic, readwrite, copy) NSString* wwwFolderName;
-@property (nonatomic, readwrite, copy) NSString* startPage;
-@property (nonatomic, readonly, strong) CDVCommandQueue* commandQueue;
-@property (nonatomic, readonly, strong) id <CDVWebViewEngineProtocol> webViewEngine;
-@property (nonatomic, readonly, strong) id <CDVCommandDelegate> commandDelegate;
-
-/**
- The complete user agent that Cordova will use when sending web requests.
- */
-@property (nonatomic, readonly) NSString* userAgent;
-
-/**
- The base user agent data that Cordova will use to build its user agent.  If this
- property isn't set, Cordova will use the standard web view user agent as its
- base.
- */
-@property (nonatomic, readwrite, copy) NSString* baseUserAgent;
-
-+ (NSDictionary*)getBundlePlist:(NSString*)plistName;
-+ (NSString*)applicationDocumentsDirectory;
-
-- (void)printMultitaskingInfo;
-- (void)createGapView;
-- (UIView*)newCordovaViewWithFrame:(CGRect)bounds;
-
-- (void)javascriptAlert:(NSString*)text;
-- (NSString*)appURLScheme;
-
-- (NSArray*)parseInterfaceOrientations:(NSArray*)orientations;
-- (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation;
-
-- (id)getCommandInstance:(NSString*)pluginName;
-- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className;
-- (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName;
-
-- (BOOL)URLisAllowed:(NSURL*)url;
-
-@end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[04/50] [abbrv] ios commit: CB-8473 - Remove AppDelegate code from template (includes uncrustify style fix-ups)

Posted by ia...@apache.org.
CB-8473 - Remove AppDelegate code from template (includes uncrustify style fix-ups)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/0053d35b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/0053d35b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/0053d35b

Branch: refs/heads/unplug-whitelist
Commit: 0053d35b4ab3239e6c74e1ddc628d01827e282d6
Parents: 205a662
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Mar 12 16:10:50 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Mar 12 16:10:50 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVAppDelegate.h             |  28 ++++
 CordovaLib/Classes/CDVAppDelegate.m             | 143 +++++++++++++++++++
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj |   8 ++
 .../__PROJECT_NAME__/Classes/AppDelegate.h      |  13 +-
 .../__PROJECT_NAME__/Classes/AppDelegate.m      | 116 +--------------
 5 files changed, 183 insertions(+), 125 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/0053d35b/CordovaLib/Classes/CDVAppDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAppDelegate.h b/CordovaLib/Classes/CDVAppDelegate.h
new file mode 100644
index 0000000..de5b518
--- /dev/null
+++ b/CordovaLib/Classes/CDVAppDelegate.h
@@ -0,0 +1,28 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CDVViewController.h"
+
+@interface CDVAppDelegate : NSObject <UIApplicationDelegate>{}
+
+@property (nonatomic, strong) IBOutlet UIWindow* window;
+@property (nonatomic, strong) IBOutlet CDVViewController* viewController;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/0053d35b/CordovaLib/Classes/CDVAppDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAppDelegate.m b/CordovaLib/Classes/CDVAppDelegate.m
new file mode 100644
index 0000000..ab81d7d
--- /dev/null
+++ b/CordovaLib/Classes/CDVAppDelegate.m
@@ -0,0 +1,143 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVAppDelegate.h"
+
+@implementation CDVAppDelegate
+
+@synthesize window, viewController;
+
+- (id)init
+{
+    /** If you need to do any extra app-specific initialization, you can do it here
+     *  -jm
+     **/
+    NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
+
+    [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
+
+    int cacheSizeMemory = 8 * 1024 * 1024; // 8MB
+    int cacheSizeDisk = 32 * 1024 * 1024; // 32MB
+#if __has_feature(objc_arc)
+        NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
+#else
+        NSURLCache* sharedCache = [[[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"] autorelease];
+#endif
+    [NSURLCache setSharedURLCache:sharedCache];
+
+    self = [super init];
+    return self;
+}
+
+#pragma mark UIApplicationDelegate implementation
+
+/**
+ * This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up)
+ */
+- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
+{
+    CGRect screenBounds = [[UIScreen mainScreen] bounds];
+
+#if __has_feature(objc_arc)
+        self.window = [[UIWindow alloc] initWithFrame:screenBounds];
+#else
+        self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
+#endif
+    self.window.autoresizesSubviews = YES;
+
+    // only set if not already set in subclass
+    if (self.viewController == nil) {
+#if __has_feature(objc_arc)
+            self.viewController = [[CDVViewController alloc] init];
+#else
+            self.viewController = [[[CDVViewController alloc] init] autorelease];
+#endif
+    }
+
+    // Set your app's start page by setting the <content src='foo.html' /> tag in config.xml.
+    // If necessary, uncomment the line below to override it.
+    // self.viewController.startPage = @"index.html";
+
+    // NOTE: To customize the view's frame size (which defaults to full screen), override
+    // [self.viewController viewWillAppear:] in your view controller.
+
+    self.window.rootViewController = self.viewController;
+    [self.window makeKeyAndVisible];
+
+    return YES;
+}
+
+// this happens while we are running ( in the background, or from within our own app )
+// only valid if 40x-Info.plist specifies a protocol to handle
+- (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation
+{
+    if (!url) {
+        return NO;
+    }
+
+    // all plugins will get the notification, and their handlers will be called
+    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
+
+    return YES;
+}
+
+// repost all remote and local notification using the default NSNotificationCenter so multiple plugins may respond
+- (void)            application:(UIApplication*)application
+    didReceiveLocalNotification:(UILocalNotification*)notification
+{
+    // re-post ( broadcast )
+    [[NSNotificationCenter defaultCenter] postNotificationName:CDVLocalNotification object:notification];
+}
+
+#ifndef DISABLE_PUSH_NOTIFICATIONS
+
+    - (void)                                 application:(UIApplication*)application
+        didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
+    {
+        // re-post ( broadcast )
+        NSString* token = [[[[deviceToken description]
+            stringByReplacingOccurrencesOfString:@"<" withString:@""]
+            stringByReplacingOccurrencesOfString:@">" withString:@""]
+            stringByReplacingOccurrencesOfString:@" " withString:@""];
+
+        [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotification object:token];
+    }
+
+    - (void)                                 application:(UIApplication*)application
+        didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
+    {
+        // re-post ( broadcast )
+        [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotificationError object:error];
+    }
+#endif
+
+- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
+{
+    // iPhone doesn't support upside down by default, while the iPad does.  Override to allow all orientations always, and let the root view controller decide what's allowed (the supported orientations mask gets intersected).
+    NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown);
+
+    return supportedInterfaceOrientations;
+}
+
+- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application
+{
+    [[NSURLCache sharedURLCache] removeAllCachedResponses];
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/0053d35b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index c30a128..0c757d6 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -34,6 +34,8 @@
 		7E14B5A81705050A0032169E /* CDVTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E14B5A61705050A0032169E /* CDVTimer.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7E14B5A91705050A0032169E /* CDVTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E14B5A71705050A0032169E /* CDVTimer.m */; };
 		7E5D94151AB23DB400F4D9EB /* CDVPlugin+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E5D94141AB23DB400F4D9EB /* CDVPlugin+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		7E5D94181AB250F800F4D9EB /* CDVAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E5D94161AB250F800F4D9EB /* CDVAppDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		7E5D94191AB250F800F4D9EB /* CDVAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E5D94171AB250F800F4D9EB /* CDVAppDelegate.m */; };
 		8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
 		8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -81,6 +83,8 @@
 		7E14B5A61705050A0032169E /* CDVTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVTimer.h; path = Classes/CDVTimer.h; sourceTree = "<group>"; };
 		7E14B5A71705050A0032169E /* CDVTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVTimer.m; path = Classes/CDVTimer.m; sourceTree = "<group>"; };
 		7E5D94141AB23DB400F4D9EB /* CDVPlugin+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CDVPlugin+Private.h"; path = "Classes/CDVPlugin+Private.h"; sourceTree = "<group>"; };
+		7E5D94161AB250F800F4D9EB /* CDVAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAppDelegate.h; path = Classes/CDVAppDelegate.h; sourceTree = "<group>"; };
+		7E5D94171AB250F800F4D9EB /* CDVAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVAppDelegate.m; path = Classes/CDVAppDelegate.m; sourceTree = "<group>"; };
 		8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
 		8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
 		8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVInvokedUrlCommand.h; path = Classes/CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
@@ -166,6 +170,8 @@
 				8887FD501090FBE7009987E8 /* NSData+Base64.h */,
 				8887FD511090FBE7009987E8 /* NSData+Base64.m */,
 				306ADAE21AAA73E100CAC885 /* CDVWebViewEngineProtocol.h */,
+				7E5D94161AB250F800F4D9EB /* CDVAppDelegate.h */,
+				7E5D94171AB250F800F4D9EB /* CDVAppDelegate.m */,
 			);
 			name = Public;
 			sourceTree = "<group>";
@@ -219,6 +225,7 @@
 				306ADAE61AAA73E100CAC885 /* CDVWebViewEngineProtocol.h in Headers */,
 				EB96673B16A8970A00D86CDF /* CDVUserAgentUtil.h in Headers */,
 				306ADAEA1AAA745400CAC885 /* CDVCommandQueue.h in Headers */,
+				7E5D94181AB250F800F4D9EB /* CDVAppDelegate.h in Headers */,
 				7E5D94151AB23DB400F4D9EB /* CDVPlugin+Private.h in Headers */,
 				EB6A98571A77FA430013FCDB /* NSData+Base64.h in Headers */,
 				306ADAEB1AAA747100CAC885 /* NSMutableArray+QueueAdditions.h in Headers */,
@@ -289,6 +296,7 @@
 				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
 				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
 				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
+				7E5D94191AB250F800F4D9EB /* CDVAppDelegate.m in Sources */,
 				8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
 				3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
 				306ADAE51AAA73E100CAC885 /* CDVUIWebViewEngine.m in Sources */,

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/0053d35b/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.h
----------------------------------------------------------------------
diff --git a/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.h b/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.h
index c5ecc85..2f72442 100644
--- a/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.h
+++ b/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.h
@@ -25,18 +25,9 @@
 //  Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
 //
 
-#import <UIKit/UIKit.h>
-
 #import <Cordova/CDVViewController.h>
+#import <Cordova/CDVAppDelegate.h>
 
-@interface AppDelegate : NSObject <UIApplicationDelegate>{}
-
-// invoke string is passed to your app on launch, this is only valid if you
-// edit __PROJECT_NAME__-Info.plist to add a protocol
-// a simple tutorial can be found here :
-// http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
-
-@property (nonatomic, strong) IBOutlet UIWindow* window;
-@property (nonatomic, strong) IBOutlet CDVViewController* viewController;
+@interface AppDelegate : CDVAppDelegate {}
 
 @end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/0053d35b/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m
----------------------------------------------------------------------
diff --git a/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m b/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m
index 3cb3198..f936ce3 100644
--- a/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m
+++ b/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m
@@ -28,124 +28,12 @@
 #import "AppDelegate.h"
 #import "MainViewController.h"
 
-#import <Cordova/CDVPlugin.h>
-
 @implementation AppDelegate
 
-@synthesize window, viewController;
-
-- (id)init
-{
-    /** If you need to do any extra app-specific initialization, you can do it here
-     *  -jm
-     **/
-    NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
-
-    [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
-
-    int cacheSizeMemory = 8 * 1024 * 1024; // 8MB
-    int cacheSizeDisk = 32 * 1024 * 1024; // 32MB
-#if __has_feature(objc_arc)
-        NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
-#else
-        NSURLCache* sharedCache = [[[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"] autorelease];
-#endif
-    [NSURLCache setSharedURLCache:sharedCache];
-
-    self = [super init];
-    return self;
-}
-
-#pragma mark UIApplicationDelegate implementation
-
-/**
- * This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up)
- */
 - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
 {
-    CGRect screenBounds = [[UIScreen mainScreen] bounds];
-
-#if __has_feature(objc_arc)
-        self.window = [[UIWindow alloc] initWithFrame:screenBounds];
-#else
-        self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
-#endif
-    self.window.autoresizesSubviews = YES;
-
-#if __has_feature(objc_arc)
-        self.viewController = [[MainViewController alloc] init];
-#else
-        self.viewController = [[[MainViewController alloc] init] autorelease];
-#endif
-
-    // Set your app's start page by setting the <content src='foo.html' /> tag in config.xml.
-    // If necessary, uncomment the line below to override it.
-    // self.viewController.startPage = @"index.html";
-
-    // NOTE: To customize the view's frame size (which defaults to full screen), override
-    // [self.viewController viewWillAppear:] in your view controller.
-
-    self.window.rootViewController = self.viewController;
-    [self.window makeKeyAndVisible];
-
-    return YES;
-}
-
-// this happens while we are running ( in the background, or from within our own app )
-// only valid if __PROJECT_NAME__-Info.plist specifies a protocol to handle
-- (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation
-{
-    if (!url) {
-        return NO;
-    }
-
-    // all plugins will get the notification, and their handlers will be called
-    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
-
-    return YES;
-}
-
-// repost all remote and local notification using the default NSNotificationCenter so multiple plugins may respond
-- (void)            application:(UIApplication*)application
-    didReceiveLocalNotification:(UILocalNotification*)notification
-{
-    // re-post ( broadcast )
-    [[NSNotificationCenter defaultCenter] postNotificationName:CDVLocalNotification object:notification];
-}
-
-#ifndef DISABLE_PUSH_NOTIFICATIONS
-
-    - (void)                                 application:(UIApplication*)application
-        didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
-    {
-        // re-post ( broadcast )
-        NSString* token = [[[[deviceToken description]
-            stringByReplacingOccurrencesOfString:@"<" withString:@""]
-            stringByReplacingOccurrencesOfString:@">" withString:@""]
-            stringByReplacingOccurrencesOfString:@" " withString:@""];
-
-        [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotification object:token];
-    }
-
-    - (void)                                 application:(UIApplication*)application
-        didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
-    {
-        // re-post ( broadcast )
-        [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotificationError object:error];
-    }
-#endif
-
-- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
-{
-    // iPhone doesn't support upside down by default, while the iPad does.  Override to allow all orientations always, and let the root view controller decide what's allowed (the supported orientations mask gets intersected).
-    NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown);
-
-    return supportedInterfaceOrientations;
-}
-
-- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application
-{
-    [[NSURLCache sharedURLCache] removeAllCachedResponses];
+    self.viewController = [[MainViewController alloc] init];
+    return [super application:application didFinishLaunchingWithOptions:launchOptions];
 }
 
 @end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[26/50] [abbrv] ios commit: Move public header file from Private group to Public group.

Posted by ia...@apache.org.
Move public header file from Private group to Public group.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/550ab308
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/550ab308
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/550ab308

Branch: refs/heads/unplug-whitelist
Commit: 550ab3084599c98507cc78b7eeb7b72e9b6de4f4
Parents: b571715
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Mar 17 17:18:32 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Mar 17 17:18:32 2015 -0700

----------------------------------------------------------------------
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/550ab308/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index 65da551..4e444c8 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -178,6 +178,8 @@
 				7E5D94171AB250F800F4D9EB /* CDVAppDelegate.m */,
 				306A45001AB7B073003D6925 /* CDVPlugin+Resources.h */,
 				306A45011AB7B073003D6925 /* CDVPlugin+Resources.m */,
+				306ADAE31AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h */,
+				306ADAE41AAA73E100CAC885 /* NSDictionary+CordovaPreferences.m */,
 			);
 			name = Public;
 			sourceTree = "<group>";
@@ -185,9 +187,7 @@
 		888700D910923009009987E8 /* Private */ = {
 			isa = PBXGroup;
 			children = (
-				306ADAE31AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h */,
 				306ADAE11AAA73E100CAC885 /* CDVUIWebViewEngine.m */,
-				306ADAE41AAA73E100CAC885 /* NSDictionary+CordovaPreferences.m */,
 				306ADADE1AAA73A800CAC885 /* CDVHandleOpenURL.m */,
 				306ADADC1AAA739800CAC885 /* CDVHandleOpenURL.h */,
 				302965BB13A94E9D007046C5 /* CDVDebug.h */,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[27/50] [abbrv] ios commit: CB-8697 - Remove obsolete "merges" folder reference in default template(s)

Posted by ia...@apache.org.
CB-8697 - Remove obsolete "merges" folder reference in default template(s)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/6fd84322
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/6fd84322
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/6fd84322

Branch: refs/heads/unplug-whitelist
Commit: 6fd843229b0053605812429e753719ad0b8b88c9
Parents: 550ab30
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Mar 17 17:28:00 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Mar 17 17:28:00 2015 -0700

----------------------------------------------------------------------
 bin/templates/project/__CLI__.xcodeproj/project.pbxproj | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/6fd84322/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
index 4633168..4a715b7 100755
--- a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
@@ -102,7 +102,6 @@
 		7E7966DD1810823500FA85AD /* icon-small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-small@2x.png"; sourceTree = "<group>"; };
 		8D1107310486CEB800E47090 /* __PROJECT_NAME__-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "__PROJECT_NAME__-Info.plist"; path = "../__PROJECT_NAME__-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
 		D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x~iphone.png"; sourceTree = "<group>"; };
-		EB87FDF21871DA7A0020F90C /* merges */ = {isa = PBXFileReference; lastKnownFileType = folder; name = merges; path = ../../merges; sourceTree = "<group>"; };
 		EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = "<group>"; };
 		EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = "<group>"; };
 		F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = "__PROJECT_NAME__/config.xml"; sourceTree = "<group>"; };
@@ -147,7 +146,6 @@
 			children = (
 				EB87FDF41871DAF40020F90C /* config.xml */,
 				EB87FDF31871DA8E0020F90C /* www */,
-				EB87FDF21871DA7A0020F90C /* merges */,
 				EB87FDF11871DA420020F90C /* Staging */,
 				301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */,
 				080E96DDFE201D6D7F000001 /* Classes */,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[39/50] [abbrv] ios commit: Fix unit tests for private core plugins (plus style fix-ups)

Posted by ia...@apache.org.
Fix unit tests for private core plugins (plus style fix-ups)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/a65420be
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/a65420be
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/a65420be

Branch: refs/heads/unplug-whitelist
Commit: a65420befd2f6d2ecfca0981ba2c86705db8ad23
Parents: d856500
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Mar 18 15:46:16 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Mar 18 15:46:16 2015 -0700

----------------------------------------------------------------------
 tests/CordovaLibTests/CDVLocalStorageTests.m                   | 6 +++---
 .../CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj  | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a65420be/tests/CordovaLibTests/CDVLocalStorageTests.m
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CDVLocalStorageTests.m b/tests/CordovaLibTests/CDVLocalStorageTests.m
index b816d4b..3a95f88 100644
--- a/tests/CordovaLibTests/CDVLocalStorageTests.m
+++ b/tests/CordovaLibTests/CDVLocalStorageTests.m
@@ -19,7 +19,7 @@
 
 #import <XCTest/XCTest.h>
 
-#import <Cordova/CDVLocalStorage.h>
+#import "CDVLocalStorage.h"
 #import "CDVWebViewTest.h"
 #import "CDVFakeFileManager.h"
 #import "ViewController.h"
@@ -122,7 +122,7 @@
 
     XCTAssertTrue(modified, @"Should have applied fix.");
     NSString* newPath = [appPlistDict objectForKey:@"WebKitLocalStorageDatabasePathPreferenceKey"];
-    XCTAssertTrue([@"/bpath/Library/Caches" isEqualToString: newPath]);
+    XCTAssertTrue([@"/bpath/Library/Caches" isEqualToString:newPath]);
 }
 
 - (void)testVerifyAndFixDatabaseLocations_changeRequired2
@@ -140,7 +140,7 @@
 
     XCTAssertTrue(modified, @"Should have applied fix.");
     NSString* newPath = [appPlistDict objectForKey:@"WebDatabaseDirectory"];
-    XCTAssertTrue([@"/bpath/Library/WebKit" isEqualToString: newPath]);
+    XCTAssertTrue([@"/bpath/Library/WebKit" isEqualToString:newPath]);
 }
 
 @end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a65420be/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
index eb6ce33..154727d 100644
--- a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
+++ b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
@@ -528,6 +528,7 @@
 					"$(inherited)",
 					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
 					"$(BUILT_PRODUCTS_DIR)/usr/local/include",
+					"$(BUILT_PRODUCTS_DIR)/include/Cordova/**",
 				);
 				INFOPLIST_FILE = "CordovaLibTests-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
@@ -561,6 +562,7 @@
 					"$(inherited)",
 					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
 					"$(BUILT_PRODUCTS_DIR)/usr/local/include",
+					"$(BUILT_PRODUCTS_DIR)/include/Cordova/**",
 				);
 				INFOPLIST_FILE = "CordovaLibTests-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 7.0;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[02/50] [abbrv] ios commit: CB-7753 - Remove CDV_IsIPad and CDV_IsIPhone5 macros in CDVAvailabiltyDeprecated.h

Posted by ia...@apache.org.
CB-7753 - Remove CDV_IsIPad and CDV_IsIPhone5 macros in CDVAvailabiltyDeprecated.h


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/de02f999
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/de02f999
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/de02f999

Branch: refs/heads/unplug-whitelist
Commit: de02f9994bfbed20143a6ea38492f3722a84f9de
Parents: ffdf774
Author: Shazron Abdullah <sh...@gmail.com>
Authored: Fri Mar 6 17:04:42 2015 -0800
Committer: Shazron Abdullah <sh...@gmail.com>
Committed: Fri Mar 6 17:04:42 2015 -0800

----------------------------------------------------------------------
 CordovaLib/Classes/CDVAvailabilityDeprecated.h | 14 --------------
 1 file changed, 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/de02f999/CordovaLib/Classes/CDVAvailabilityDeprecated.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAvailabilityDeprecated.h b/CordovaLib/Classes/CDVAvailabilityDeprecated.h
index 4562a7c..abf7a16 100644
--- a/CordovaLib/Classes/CDVAvailabilityDeprecated.h
+++ b/CordovaLib/Classes/CDVAvailabilityDeprecated.h
@@ -24,17 +24,3 @@
 #else
     #define CDV_DEPRECATED(version, msg) __attribute__((deprecated()))
 #endif
-
-static inline BOOL CDV_IsIPad(void) CDV_DEPRECATED(3.7 .0, "This will be removed in 4.0.0");
-
-static inline BOOL CDV_IsIPhone5(void) CDV_DEPRECATED(3.7 .0, "This will be removed in 4.0.0");
-
-static inline BOOL CDV_IsIPad(void)
-{
-    return [[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad;
-}
-
-static inline BOOL CDV_IsIPhone5(void)
-{
-    return ([[UIScreen mainScreen] bounds].size.width == 568 && [[UIScreen mainScreen] bounds].size.height == 320) || ([[UIScreen mainScreen] bounds].size.height == 568 && [[UIScreen mainScreen] bounds].size.width == 320);
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[49/50] [abbrv] ios commit: Remove whitelist objects from CDVURLProtocol and CDVViewController classes

Posted by ia...@apache.org.
Remove whitelist objects from CDVURLProtocol and CDVViewController classes


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/57939bcf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/57939bcf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/57939bcf

Branch: refs/heads/unplug-whitelist
Commit: 57939bcf8f72c8bd858a6092bf4bcbd3a6d01203
Parents: 1e8ae64
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Oct 24 16:13:47 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Mar 19 11:06:30 2015 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDVURLProtocol.m    | 14 +-------------
 CordovaLib/Classes/Public/CDVViewController.h |  2 --
 CordovaLib/Classes/Public/CDVViewController.m |  4 +---
 3 files changed, 2 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/57939bcf/CordovaLib/Classes/Public/CDVURLProtocol.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVURLProtocol.m b/CordovaLib/Classes/Public/CDVURLProtocol.m
index a7a38cd..c345060 100644
--- a/CordovaLib/Classes/Public/CDVURLProtocol.m
+++ b/CordovaLib/Classes/Public/CDVURLProtocol.m
@@ -23,10 +23,8 @@
 #import <MobileCoreServices/MobileCoreServices.h>
 #import "CDVURLProtocol.h"
 #import "CDVCommandQueue.h"
-#import "CDVWhitelist.h"
 #import "CDVViewController.h"
 
-static CDVWhitelist* gWhitelist = nil;
 // Contains a set of NSNumbers of addresses of controllers. It doesn't store
 // the actual pointer to avoid retaining.
 static NSMutableSet* gRegisteredControllers = nil;
@@ -77,16 +75,6 @@ static CDVViewController *viewControllerForRequest(NSURLRequest* request)
     if (gRegisteredControllers == nil) {
         [NSURLProtocol registerClass:[CDVURLProtocol class]];
         gRegisteredControllers = [[NSMutableSet alloc] initWithCapacity:8];
-        // The whitelist doesn't change, so grab the first one and store it.
-        gWhitelist = viewController.whitelist;
-
-        // Note that we grab the whitelist from the first viewcontroller for now - but this will change
-        // when we allow a registered viewcontroller to have its own whitelist (e.g InAppBrowser)
-        // Differentiating the requests will be through the 'vc' http header below as used for the js->objc bridge.
-        //  The 'vc' value is generated by casting the viewcontroller object to a (long long) value (see CDVViewController::webViewDidFinishLoad)
-        if (gWhitelist == nil) {
-            NSLog(@"WARNING: NO whitelist has been set in CDVURLProtocol.");
-        }
     }
 
     @synchronized(gRegisteredControllers) {
@@ -179,7 +167,7 @@ static CDVViewController *viewControllerForRequest(NSURLRequest* request)
         return;
     }
 
-    NSString* body = [gWhitelist errorStringForURL:url];
+    NSString* body = [NSString stringWithFormat:@"Access not allowed to URL: %@", url];
     [self sendResponseWithResponseCode:401 data:[body dataUsingEncoding:NSASCIIStringEncoding] mimeType:nil];
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/57939bcf/CordovaLib/Classes/Public/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.h b/CordovaLib/Classes/Public/CDVViewController.h
index f654d6c..27d4807 100644
--- a/CordovaLib/Classes/Public/CDVViewController.h
+++ b/CordovaLib/Classes/Public/CDVViewController.h
@@ -23,7 +23,6 @@
 #import "CDVInvokedUrlCommand.h"
 #import "CDVCommandDelegate.h"
 #import "CDVCommandQueue.h"
-#import "CDVWhitelist.h"
 #import "CDVScreenOrientationDelegate.h"
 #import "CDVPlugin.h"
 #import "CDVWebViewEngineProtocol.h"
@@ -44,7 +43,6 @@
 @property (nonatomic, readonly, strong) NSDictionary* pluginsMap;
 @property (nonatomic, readonly, strong) NSMutableDictionary* settings;
 @property (nonatomic, readonly, strong) NSXMLParser* configParser;
-@property (nonatomic, readonly, strong) CDVWhitelist* whitelist; // readonly for public
 @property (nonatomic, readonly, assign) BOOL loadFromString;
 
 @property (nonatomic, readwrite, copy) NSString* wwwFolderName;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/57939bcf/CordovaLib/Classes/Public/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index 7247200..305c63e 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -36,7 +36,6 @@
 
 @property (nonatomic, readwrite, strong) NSXMLParser* configParser;
 @property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
-@property (nonatomic, readwrite, strong) CDVWhitelist* whitelist;
 @property (nonatomic, readwrite, strong) NSMutableDictionary* pluginObjects;
 @property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
 @property (nonatomic, readwrite, strong) NSDictionary* pluginsMap;
@@ -53,7 +52,7 @@
 @implementation CDVViewController
 
 @synthesize supportedOrientations;
-@synthesize pluginObjects, pluginsMap, whitelist, startupPluginNames;
+@synthesize pluginObjects, pluginsMap, startupPluginNames;
 @synthesize configParser, settings, loadFromString;
 @synthesize wwwFolderName, startPage, initialized, openURL, baseUserAgent;
 @synthesize commandDelegate = _commandDelegate;
@@ -188,7 +187,6 @@
     // Get the plugin dictionary, whitelist and settings from the delegate.
     self.pluginsMap = delegate.pluginsDict;
     self.startupPluginNames = delegate.startupPluginNames;
-    self.whitelist = [[CDVWhitelist alloc] initWithArray:delegate.whitelistHosts];
     self.settings = delegate.settings;
 
     // And the start folder/page.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[47/50] [abbrv] ios commit: Add deprecation message for [CDVViewController URLIsAllowed]

Posted by ia...@apache.org.
Add deprecation message for [CDVViewController URLIsAllowed]


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/1ebb298f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/1ebb298f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/1ebb298f

Branch: refs/heads/unplug-whitelist
Commit: 1ebb298ffd479468c31ddecf2a8c07b8bdcf1dcd
Parents: d4829c1
Author: Ian Clelland <ic...@chromium.org>
Authored: Wed Nov 12 09:55:45 2014 -0500
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Mar 19 11:06:30 2015 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDVViewController.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1ebb298f/CordovaLib/Classes/Public/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.h b/CordovaLib/Classes/Public/CDVViewController.h
index 27d4807..0ad1c89 100644
--- a/CordovaLib/Classes/Public/CDVViewController.h
+++ b/CordovaLib/Classes/Public/CDVViewController.h
@@ -80,7 +80,7 @@
 - (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className;
 - (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName;
 
-- (BOOL)URLisAllowed:(NSURL*)url __attribute__((deprecated));
+- (BOOL)URLisAllowed:(NSURL*)url __attribute__((deprecated("Scheduled for removal in 5.0. Use shouldAllowRequestForURL, shouldAllowNavigationToURL or shouldOpenExternalURL instead.")));
 - (BOOL)shouldAllowRequestForURL:(NSURL *)url;
 - (BOOL)shouldAllowNavigationToURL:(NSURL *)url;
 - (BOOL)shouldOpenExternalURL:(NSURL *)url;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[17/50] [abbrv] ios commit: CB-8678 - Included core plugins should be added through configuration, not code

Posted by ia...@apache.org.
CB-8678 - Included core plugins should be added through configuration, not code


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/98fcf662
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/98fcf662
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/98fcf662

Branch: refs/heads/unplug-whitelist
Commit: 98fcf66283f634111e323ac23189777d1c49566c
Parents: 1ffec81
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Mar 16 16:40:15 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Mar 16 16:40:15 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVViewController.m            | 9 +++++----
 bin/templates/project/__PROJECT_NAME__/config.xml | 4 ++++
 tests/CordovaLibTests/CordovaLibApp/config.xml    | 4 ++++
 3 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/98fcf662/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 6f271ce..6b40a84 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -38,7 +38,7 @@
 @property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
 @property (nonatomic, readwrite, strong) CDVWhitelist* whitelist;
 @property (nonatomic, readwrite, strong) NSMutableDictionary* pluginObjects;
-@property (nonatomic, readwrite, strong) NSArray* startupPluginNames;
+@property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
 @property (nonatomic, readwrite, strong) NSDictionary* pluginsMap;
 @property (nonatomic, readwrite, strong) NSArray* supportedOrientations;
 @property (nonatomic, readwrite, assign) BOOL loadFromString;
@@ -297,7 +297,10 @@
         With minimum iOS 6/7 supported, only first clause applies.
      */
     if ([backupWebStorageType isEqualToString:@"local"]) {
-        [self registerPlugin:[[CDVLocalStorage alloc] initWithWebViewEngine:self.webViewEngine] withClassName:NSStringFromClass([CDVLocalStorage class])];
+        NSString* localStorageFeatureName = @"localstorage";
+        if ([self.pluginsMap objectForKey:localStorageFeatureName]) { // plugin specified in config
+            [self.startupPluginNames addObject:localStorageFeatureName];
+        }
     }
 
     if ([self.startupPluginNames count] > 0) {
@@ -312,8 +315,6 @@
         [CDVTimer stop:@"TotalPluginStartup"];
     }
 
-    [self registerPlugin:[[CDVHandleOpenURL alloc] initWithWebViewEngine:self.webViewEngine] withClassName:NSStringFromClass([CDVHandleOpenURL class])];
-
     // /////////////////
     NSURL* appURL = [self appUrl];
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/98fcf662/bin/templates/project/__PROJECT_NAME__/config.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/__PROJECT_NAME__/config.xml b/bin/templates/project/__PROJECT_NAME__/config.xml
index 985ae7f..f13f415 100644
--- a/bin/templates/project/__PROJECT_NAME__/config.xml
+++ b/bin/templates/project/__PROJECT_NAME__/config.xml
@@ -63,4 +63,8 @@
     <feature name="LocalStorage">
         <param name="ios-package" value="CDVLocalStorage"/>
     </feature>
+    <feature name="HandleOpenUrl">
+        <param name="ios-package" value="CDVHandleOpenUrl"/>
+        <param name="onload" value="true"/>
+    </feature>
 </widget>

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/98fcf662/tests/CordovaLibTests/CordovaLibApp/config.xml
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CordovaLibApp/config.xml b/tests/CordovaLibTests/CordovaLibApp/config.xml
index 149e8fd..30bc139 100644
--- a/tests/CordovaLibTests/CordovaLibApp/config.xml
+++ b/tests/CordovaLibTests/CordovaLibApp/config.xml
@@ -51,4 +51,8 @@
     <feature name="LocalStorage">
         <param name="ios-package" value="CDVLocalStorage"/>
     </feature>
+    <feature name="HandleOpenUrl">
+        <param name="ios-package" value="CDVHandleOpenUrl"/>
+        <param name="onload" value="true"/>
+    </feature>
 </widget>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[25/50] [abbrv] ios commit: Add CDVAppDelegate.h to main header

Posted by ia...@apache.org.
Add CDVAppDelegate.h to main header


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/b5717153
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/b5717153
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/b5717153

Branch: refs/heads/unplug-whitelist
Commit: b57171530af4f374e6195c90f8f27c888bd5c57f
Parents: 1a44a4e
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Mar 17 02:35:12 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Mar 17 02:35:12 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDV.h | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b5717153/CordovaLib/Classes/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDV.h b/CordovaLib/Classes/CDV.h
index 7d5ec3f..fbeaea2 100644
--- a/CordovaLib/Classes/CDV.h
+++ b/CordovaLib/Classes/CDV.h
@@ -19,6 +19,7 @@
 
 #import "CDVAvailability.h"
 #import "CDVAvailabilityDeprecated.h"
+#import "CDVAppDelegate.h"
 #import "CDVPlugin.h"
 #import "CDVPluginResult.h"
 #import "CDVViewController.h"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[06/50] [abbrv] ios commit: CB-8474 - Remove local/remote push notification delegates from CDVAppDelegate

Posted by ia...@apache.org.
CB-8474 - Remove local/remote push notification delegates from CDVAppDelegate


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/962f47cb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/962f47cb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/962f47cb

Branch: refs/heads/unplug-whitelist
Commit: 962f47cbf050c469372201c42357a3bb938f26ac
Parents: 4d60a63
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Mar 12 16:30:34 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Mar 12 16:30:34 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVAppDelegate.m | 30 ------------------------------
 1 file changed, 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/962f47cb/CordovaLib/Classes/CDVAppDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAppDelegate.m b/CordovaLib/Classes/CDVAppDelegate.m
index d582161..52f5837 100644
--- a/CordovaLib/Classes/CDVAppDelegate.m
+++ b/CordovaLib/Classes/CDVAppDelegate.m
@@ -85,36 +85,6 @@
     return YES;
 }
 
-// repost all remote and local notification using the default NSNotificationCenter so multiple plugins may respond
-- (void)            application:(UIApplication*)application
-    didReceiveLocalNotification:(UILocalNotification*)notification
-{
-    // re-post ( broadcast )
-    [[NSNotificationCenter defaultCenter] postNotificationName:CDVLocalNotification object:notification];
-}
-
-#ifndef DISABLE_PUSH_NOTIFICATIONS
-
-    - (void)                                 application:(UIApplication*)application
-        didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
-    {
-        // re-post ( broadcast )
-        NSString* token = [[[[deviceToken description]
-            stringByReplacingOccurrencesOfString:@"<" withString:@""]
-            stringByReplacingOccurrencesOfString:@">" withString:@""]
-            stringByReplacingOccurrencesOfString:@" " withString:@""];
-
-        [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotification object:token];
-    }
-
-    - (void)                                 application:(UIApplication*)application
-        didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
-    {
-        // re-post ( broadcast )
-        [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotificationError object:error];
-    }
-#endif
-
 - (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
 {
     // iPhone doesn't support upside down by default, while the iPad does.  Override to allow all orientations always, and let the root view controller decide what's allowed (the supported orientations mask gets intersected).


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[38/50] [abbrv] ios commit: Added private core plugins into Private headers section, so unit tests for them can work

Posted by ia...@apache.org.
Added private core plugins into Private headers section, so unit tests for them can work


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/d856500e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/d856500e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/d856500e

Branch: refs/heads/unplug-whitelist
Commit: d856500ef6c02436a67d09464076bfe32ccc2994
Parents: 5920ef2
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Mar 18 15:45:17 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Mar 18 15:45:17 2015 -0700

----------------------------------------------------------------------
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d856500e/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index 4c63262..c926943 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		7E7F69B61ABA35D8007546F4 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		7E7F69B81ABA368F007546F4 /* CDVUIWebViewEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		7E7F69B91ABA3692007546F4 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF21AB9028C008C4574 /* CDVDebug.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7ED95D041AB9028C008C4574 /* CDVJSON_private.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF41AB9028C008C4574 /* CDVJSON_private.m */; };
@@ -274,6 +277,9 @@
 				7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */,
 				7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */,
 				7ED95D051AB9028C008C4574 /* CDVPlugin+Private.h in Headers */,
+				7E7F69B61ABA35D8007546F4 /* CDVLocalStorage.h in Headers */,
+				7E7F69B81ABA368F007546F4 /* CDVUIWebViewEngine.h in Headers */,
+				7E7F69B91ABA3692007546F4 /* CDVHandleOpenURL.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[36/50] [abbrv] ios commit: CB-8270 - Update Objective-C unit tests for JSON serialization. Cleaned up unit test workspace as well.

Posted by ia...@apache.org.
CB-8270 - Update Objective-C unit tests for JSON serialization. Cleaned up unit test workspace as well.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/987c515c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/987c515c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/987c515c

Branch: refs/heads/unplug-whitelist
Commit: 987c515c97c83423e82ebe2aa62544dbd8410a79
Parents: c057eb7
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Mar 18 14:20:07 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Mar 18 14:20:07 2015 -0700

----------------------------------------------------------------------
 tests/CordovaLibTests/CDVBase64Tests.m          |   4 +-
 .../CDVPluginResultJSONSerializationTests.m     |   2 +-
 .../CordovaLibTests.xcodeproj/project.pbxproj   | 196 ++++---------------
 .../xcschemes/CordovaLibApp.xcscheme            |   6 +-
 4 files changed, 49 insertions(+), 159 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/987c515c/tests/CordovaLibTests/CDVBase64Tests.m
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CDVBase64Tests.m b/tests/CordovaLibTests/CDVBase64Tests.m
index 0d44c2a..34c010e 100644
--- a/tests/CordovaLibTests/CDVBase64Tests.m
+++ b/tests/CordovaLibTests/CDVBase64Tests.m
@@ -46,7 +46,7 @@
     NSData* decodedData = [decodedString dataUsingEncoding:NSUTF8StringEncoding];
 
     NSString* expectedEncodedString = @"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwIUAjJCVeJg==";
-    NSString* actualEncodedString = [decodedData base64EncodedString];
+    NSString* actualEncodedString = [decodedData cdv_base64EncodedString];
 
     XCTAssertTrue([expectedEncodedString isEqualToString:actualEncodedString]);
 }
@@ -56,7 +56,7 @@
     NSString* encodedString = @"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwIUAjJCVeJg==";
     NSString* decodedString = @"abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&";
     NSData* encodedData = [decodedString dataUsingEncoding:NSUTF8StringEncoding];
-    NSData* decodedData = [NSData dataFromBase64String:encodedString];
+    NSData* decodedData = [NSData cdv_dataFromBase64String:encodedString];
 
     XCTAssertTrue([encodedData isEqualToData:decodedData]);
 }

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/987c515c/tests/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CDVPluginResultJSONSerializationTests.m b/tests/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
index 83ed4d4..fbecaaa 100644
--- a/tests/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
+++ b/tests/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
@@ -21,7 +21,7 @@
 #import <XCTest/XCTest.h>
 
 #import <Cordova/CDVPluginResult.h>
-#import <Cordova/CDVJSON.h>
+#import "CDVJSON_private.h"
 
 @interface CDVPluginResultJSONSerializationTests : XCTestCase
 @end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/987c515c/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
index be2e74a..eb6ce33 100644
--- a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
+++ b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
@@ -7,12 +7,7 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		3019D58D1918C00C00D72DCC /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3019D58B1918BFF800D72DCC /* XCTest.framework */; };
-		302193F91745430F00BC8D2B /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 302193F81745430F00BC8D2B /* ImageIO.framework */; };
 		3035621714104C34006C2D43 /* CDVWhitelistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 30356213141049E1006C2D43 /* CDVWhitelistTests.m */; };
-		303A406A152124BB00182201 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AA141002F100DF4CF2 /* UIKit.framework */; };
-		303A406B152124BB00182201 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AC141002F100DF4CF2 /* Foundation.framework */; };
-		303A406C152124BB00182201 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AE141002F100DF4CF2 /* CoreGraphics.framework */; };
 		303A4072152124BB00182201 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 303A4070152124BB00182201 /* InfoPlist.strings */; };
 		303A4074152124BB00182201 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 303A4073152124BB00182201 /* main.m */; };
 		303A4078152124BB00182201 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 303A4077152124BB00182201 /* AppDelegate.m */; };
@@ -21,33 +16,12 @@
 		3062D1AE151D4D9D000D9128 /* CDVLocalStorageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D1AD151D4D9D000D9128 /* CDVLocalStorageTests.m */; };
 		30B342F515224B360070E6A5 /* CDVWebViewTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B342F415224B360070E6A5 /* CDVWebViewTest.m */; };
 		30D1B08C15A2B36D0060C291 /* CDVBase64Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 30D1B08B15A2B36D0060C291 /* CDVBase64Tests.m */; };
-		30F8AE0515212587006625B3 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68A32D7414103017006B237C /* AddressBook.framework */; };
-		30F8AE0615212587006625B3 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */; };
-		30F8AE0715212587006625B3 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */; };
-		30F8AE0815212587006625B3 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357CF14100ADB00DF4CF2 /* AVFoundation.framework */; };
-		30F8AE0915212587006625B3 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357D014100ADE00DF4CF2 /* CoreLocation.framework */; };
-		30F8AE0A15212587006625B3 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357DC14100B1600DF4CF2 /* CoreMedia.framework */; };
-		30F8AE0B15212587006625B3 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357D414100AF200DF4CF2 /* SystemConfiguration.framework */; };
-		30F8AE0C152125B6006625B3 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357D214100AE700DF4CF2 /* MobileCoreServices.framework */; };
 		30F8AE1D152129DA006625B3 /* www in Resources */ = {isa = PBXBuildFile; fileRef = 30F8AE1C152129DA006625B3 /* www */; };
 		686357B5141002F200DF4CF2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 686357B3141002F200DF4CF2 /* InfoPlist.strings */; };
 		686357BA141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 686357B9141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m */; };
-		68A32D7514103017006B237C /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68A32D7414103017006B237C /* AddressBook.framework */; };
-		68A32D7614103078006B237C /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357DC14100B1600DF4CF2 /* CoreMedia.framework */; };
-		68A32D7714103082006B237C /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */; };
-		68A32D781410308B006B237C /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357CF14100ADB00DF4CF2 /* AVFoundation.framework */; };
-		68A32D7914103097006B237C /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357D014100ADE00DF4CF2 /* CoreLocation.framework */; };
-		68A32D7A141030AB006B237C /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357D214100AE700DF4CF2 /* MobileCoreServices.framework */; };
-		68A32D7B141030C8006B237C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357D414100AF200DF4CF2 /* SystemConfiguration.framework */; };
-		68A32D7C141030D0006B237C /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */; };
-		68A32D7D141030E4006B237C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AE141002F100DF4CF2 /* CoreGraphics.framework */; };
-		68A32D7E141030EB006B237C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AA141002F100DF4CF2 /* UIKit.framework */; };
-		68A32D7F141030F3006B237C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686357AC141002F100DF4CF2 /* Foundation.framework */; };
-		7E4F37A119E753FE0005159C /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E4F379E19E753740005159C /* libCordova.a */; };
 		7E91406017711D88002C6A3F /* CDVWebViewDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E91405F17711D88002C6A3F /* CDVWebViewDelegateTests.m */; };
+		7ED95D5E1ABA2098008C4574 /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7ED95D5D1ABA2098008C4574 /* libCordova.a */; };
 		7EF33BD71911ABA20048544E /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EF33BD61911ABA20048544E /* Default-568h@2x.png */; };
-		8220B5C216D541BD00EC3921 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8220B5C116D541BD00EC3921 /* AssetsLibrary.framework */; };
-		8220B5C616D542F500EC3921 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8220B5C116D541BD00EC3921 /* AssetsLibrary.framework */; };
 		EB89634A15FE66EA00E12277 /* CDVInvokedUrlCommandTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EB89634915FE66EA00E12277 /* CDVInvokedUrlCommandTests.m */; };
 		EB96677216ADBCF500D86CDF /* CDVUserAgentTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EB96677116ADBCF500D86CDF /* CDVUserAgentTest.m */; };
 		EBA3554615A731F100F4DE24 /* CDVFakeFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3554515A731F100F4DE24 /* CDVFakeFileManager.m */; };
@@ -63,32 +37,9 @@
 			remoteGlobalIDString = 303A4067152124BB00182201;
 			remoteInfo = CordovaLibApp;
 		};
-		7E4F379D19E753740005159C /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 7E4F379919E753740005159C /* CordovaLib.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 68A32D7114102E1C006B237C;
-			remoteInfo = CordovaLib;
-		};
-		7E4F379F19E753B40005159C /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 7E4F379919E753740005159C /* CordovaLib.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = D2AAC07D0554694100DB518D;
-			remoteInfo = CordovaLib;
-		};
-		7E4F37A219E754240005159C /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 7E4F379919E753740005159C /* CordovaLib.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = D2AAC07D0554694100DB518D;
-			remoteInfo = CordovaLib;
-		};
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXFileReference section */
-		3019D58B1918BFF800D72DCC /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
-		302193F81745430F00BC8D2B /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
 		30356213141049E1006C2D43 /* CDVWhitelistTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWhitelistTests.m; sourceTree = "<group>"; };
 		303A4068152124BB00182201 /* CordovaLibApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CordovaLibApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		303A406F152124BB00182201 /* CordovaLibApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "CordovaLibApp-Info.plist"; sourceTree = "<group>"; };
@@ -104,36 +55,20 @@
 		30D1B08B15A2B36D0060C291 /* CDVBase64Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVBase64Tests.m; sourceTree = "<group>"; };
 		30F8AE1C152129DA006625B3 /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
 		686357A9141002F100DF4CF2 /* CordovaLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CordovaLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
-		686357AA141002F100DF4CF2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		686357AC141002F100DF4CF2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		686357AE141002F100DF4CF2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
 		686357B2141002F200DF4CF2 /* CordovaLibTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CordovaLibTests-Info.plist"; sourceTree = "<group>"; };
 		686357B4141002F200DF4CF2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		686357B9141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDVPluginResultJSONSerializationTests.m; sourceTree = "<group>"; };
-		686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		686357CF14100ADB00DF4CF2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		686357D014100ADE00DF4CF2 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		686357D214100AE700DF4CF2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		686357D414100AF200DF4CF2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		686357DC14100B1600DF4CF2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		68A32D7414103017006B237C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		7E4F379119E74D610005159C /* libCordova.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCordova.a; path = "../../CordovaLib/build/Debug-iphoneos/libCordova.a"; sourceTree = "<group>"; };
-		7E4F379319E74DE70005159C /* libCordova.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCordova.a; path = "../../CordovaLib/build/Debug-iphoneos/libCordova.a"; sourceTree = "<group>"; };
-		7E4F379519E752070005159C /* libCordova.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCordova.a; path = "../../CordovaLib/build/Debug-iphoneos/libCordova.a"; sourceTree = "<group>"; };
-		7E4F379719E752230005159C /* libCordova.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCordova.a; path = "../../CordovaLib/build/Debug-iphoneos/libCordova.a"; sourceTree = "<group>"; };
-		7E4F379919E753740005159C /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = ../../CordovaLib/CordovaLib.xcodeproj; sourceTree = "<group>"; };
 		7E91405F17711D88002C6A3F /* CDVWebViewDelegateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewDelegateTests.m; sourceTree = "<group>"; };
+		7ED95D5D1ABA2098008C4574 /* libCordova.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCordova.a; path = "../../../../../../Library/Developer/Xcode/DerivedData/cordova-ios-hirjxekmjkchqifveonwrrdrhjqd/Build/Products/Debug-iphoneos/libCordova.a"; sourceTree = "<group>"; };
 		7EF33BD61911ABA20048544E /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
-		8220B5C116D541BD00EC3921 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
 		EB89634915FE66EA00E12277 /* CDVInvokedUrlCommandTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVInvokedUrlCommandTests.m; sourceTree = "<group>"; };
 		EB96677116ADBCF500D86CDF /* CDVUserAgentTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVUserAgentTest.m; sourceTree = "<group>"; };
 		EBA3550F15A5F18900F4DE24 /* CDVWebViewTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDVWebViewTest.h; sourceTree = "<group>"; };
 		EBA3554415A731F100F4DE24 /* CDVFakeFileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVFakeFileManager.h; sourceTree = "<group>"; };
 		EBA3554515A731F100F4DE24 /* CDVFakeFileManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVFakeFileManager.m; sourceTree = "<group>"; };
 		EBA7F20417962CCD001A0CE6 /* CDVStartPageTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVStartPageTests.m; sourceTree = "<group>"; };
+		ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = "<group>"; };
 		F8EB14D0165FFD3200616F39 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = CordovaLibApp/config.xml; sourceTree = "<group>"; };
-		ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Bridging-Header.h"; path = "Bridging-Header.h"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -141,20 +76,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				7E4F37A119E753FE0005159C /* libCordova.a in Frameworks */,
-				302193F91745430F00BC8D2B /* ImageIO.framework in Frameworks */,
-				8220B5C216D541BD00EC3921 /* AssetsLibrary.framework in Frameworks */,
-				30F8AE0C152125B6006625B3 /* MobileCoreServices.framework in Frameworks */,
-				30F8AE0515212587006625B3 /* AddressBook.framework in Frameworks */,
-				30F8AE0615212587006625B3 /* AddressBookUI.framework in Frameworks */,
-				30F8AE0715212587006625B3 /* AudioToolbox.framework in Frameworks */,
-				30F8AE0815212587006625B3 /* AVFoundation.framework in Frameworks */,
-				30F8AE0915212587006625B3 /* CoreLocation.framework in Frameworks */,
-				30F8AE0A15212587006625B3 /* CoreMedia.framework in Frameworks */,
-				303A406B152124BB00182201 /* Foundation.framework in Frameworks */,
-				30F8AE0B15212587006625B3 /* SystemConfiguration.framework in Frameworks */,
-				303A406A152124BB00182201 /* UIKit.framework in Frameworks */,
-				303A406C152124BB00182201 /* CoreGraphics.framework in Frameworks */,
+				7ED95D5E1ABA2098008C4574 /* libCordova.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -162,19 +84,6 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				3019D58D1918C00C00D72DCC /* XCTest.framework in Frameworks */,
-				68A32D7514103017006B237C /* AddressBook.framework in Frameworks */,
-				8220B5C616D542F500EC3921 /* AssetsLibrary.framework in Frameworks */,
-				68A32D7614103078006B237C /* CoreMedia.framework in Frameworks */,
-				68A32D7714103082006B237C /* AudioToolbox.framework in Frameworks */,
-				68A32D781410308B006B237C /* AVFoundation.framework in Frameworks */,
-				68A32D7914103097006B237C /* CoreLocation.framework in Frameworks */,
-				68A32D7A141030AB006B237C /* MobileCoreServices.framework in Frameworks */,
-				68A32D7B141030C8006B237C /* SystemConfiguration.framework in Frameworks */,
-				68A32D7C141030D0006B237C /* AddressBookUI.framework in Frameworks */,
-				68A32D7D141030E4006B237C /* CoreGraphics.framework in Frameworks */,
-				68A32D7E141030EB006B237C /* UIKit.framework in Frameworks */,
-				68A32D7F141030F3006B237C /* Foundation.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -206,25 +115,7 @@
 		0867D69AFE84028FC02AAC07 /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
-				7E4F379919E753740005159C /* CordovaLib.xcodeproj */,
-				7E4F379719E752230005159C /* libCordova.a */,
-				7E4F379519E752070005159C /* libCordova.a */,
-				7E4F379319E74DE70005159C /* libCordova.a */,
-				7E4F379119E74D610005159C /* libCordova.a */,
-				3019D58B1918BFF800D72DCC /* XCTest.framework */,
-				302193F81745430F00BC8D2B /* ImageIO.framework */,
-				68A32D7414103017006B237C /* AddressBook.framework */,
-				8220B5C116D541BD00EC3921 /* AssetsLibrary.framework */,
-				686357DC14100B1600DF4CF2 /* CoreMedia.framework */,
-				686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */,
-				686357CF14100ADB00DF4CF2 /* AVFoundation.framework */,
-				686357D014100ADE00DF4CF2 /* CoreLocation.framework */,
-				686357D214100AE700DF4CF2 /* MobileCoreServices.framework */,
-				686357D414100AF200DF4CF2 /* SystemConfiguration.framework */,
-				686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */,
-				686357AA141002F100DF4CF2 /* UIKit.framework */,
-				686357AC141002F100DF4CF2 /* Foundation.framework */,
-				686357AE141002F100DF4CF2 /* CoreGraphics.framework */,
+				7ED95D5D1ABA2098008C4574 /* libCordova.a */,
 			);
 			name = Frameworks;
 			sourceTree = "<group>";
@@ -262,14 +153,6 @@
 			name = "Supporting Files";
 			sourceTree = "<group>";
 		};
-		7E4F379A19E753740005159C /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				7E4F379E19E753740005159C /* libCordova.a */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
 		EB3B34F4161B585D003DBE7D /* CordovaLibTests */ = {
 			isa = PBXGroup;
 			children = (
@@ -306,7 +189,6 @@
 			buildRules = (
 			);
 			dependencies = (
-				7E4F37A019E753B40005159C /* PBXTargetDependency */,
 			);
 			name = CordovaLibApp;
 			productName = CordovaLibApp;
@@ -325,7 +207,6 @@
 			buildRules = (
 			);
 			dependencies = (
-				7E4F37A319E754240005159C /* PBXTargetDependency */,
 				30F8AE3315212F07006625B3 /* PBXTargetDependency */,
 			);
 			name = CordovaLibTests;
@@ -355,12 +236,6 @@
 			mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */;
 			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
 			projectDirPath = "";
-			projectReferences = (
-				{
-					ProductGroup = 7E4F379A19E753740005159C /* Products */;
-					ProjectRef = 7E4F379919E753740005159C /* CordovaLib.xcodeproj */;
-				},
-			);
 			projectRoot = "";
 			targets = (
 				686357A8141002F100DF4CF2 /* CordovaLibTests */,
@@ -369,16 +244,6 @@
 		};
 /* End PBXProject section */
 
-/* Begin PBXReferenceProxy section */
-		7E4F379E19E753740005159C /* libCordova.a */ = {
-			isa = PBXReferenceProxy;
-			fileType = archive.ar;
-			path = libCordova.a;
-			remoteRef = 7E4F379D19E753740005159C /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-/* End PBXReferenceProxy section */
-
 /* Begin PBXResourcesBuildPhase section */
 		303A4066152124BB00182201 /* Resources */ = {
 			isa = PBXResourcesBuildPhase;
@@ -470,16 +335,6 @@
 			target = 303A4067152124BB00182201 /* CordovaLibApp */;
 			targetProxy = 30F8AE3215212F07006625B3 /* PBXContainerItemProxy */;
 		};
-		7E4F37A019E753B40005159C /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = CordovaLib;
-			targetProxy = 7E4F379F19E753B40005159C /* PBXContainerItemProxy */;
-		};
-		7E4F37A319E754240005159C /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = CordovaLib;
-			targetProxy = 7E4F37A219E754240005159C /* PBXContainerItemProxy */;
-		};
 /* End PBXTargetDependency section */
 
 /* Begin PBXVariantGroup section */
@@ -505,6 +360,7 @@
 		1DEB922308733DC00010E9CD /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				CLANG_ENABLE_MODULES = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_EMPTY_BODY = YES;
@@ -525,6 +381,7 @@
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_CFLAGS = "-DDEBUG";
 				OTHER_LDFLAGS = (
@@ -534,16 +391,16 @@
 				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
-				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
 				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
 				TARGETED_DEVICE_FAMILY = "1,2";
-				USER_HEADER_SEARCH_PATHS = "Classes/**";
+				USER_HEADER_SEARCH_PATHS = "Classes/** \"${BUILT_PRODUCTS_DIR}\"";
 			};
 			name = Debug;
 		};
 		1DEB922408733DC00010E9CD /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				CLANG_ENABLE_MODULES = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_EMPTY_BODY = YES;
@@ -563,6 +420,7 @@
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
 				ONLY_ACTIVE_ARCH = NO;
 				OTHER_LDFLAGS = (
 					"-all_load",
@@ -571,10 +429,9 @@
 				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
-				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
 				SWIFT_OBJC_BRIDGING_HEADER = "__PROJECT_NAME__/Bridging-Header.h";
 				TARGETED_DEVICE_FAMILY = "1,2";
-				USER_HEADER_SEARCH_PATHS = "Classes/**";
+				USER_HEADER_SEARCH_PATHS = "Classes/** \"${BUILT_PRODUCTS_DIR}\"";
 			};
 			name = Release;
 		};
@@ -582,6 +439,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				COPY_PHASE_STRIP = NO;
@@ -597,8 +455,16 @@
 				);
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+				);
 				INFOPLIST_FILE = "CordovaLibApp/CordovaLibApp-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/cordova-ios-hirjxekmjkchqifveonwrrdrhjqd/Build/Products/Debug-iphoneos",
+				);
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				TARGETED_DEVICE_FAMILY = "1,2";
 				USER_HEADER_SEARCH_PATHS = "";
@@ -610,6 +476,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				COPY_PHASE_STRIP = YES;
@@ -620,8 +487,17 @@
 				GCC_C_LANGUAGE_STANDARD = gnu99;
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+					"$(BUILT_PRODUCTS_DIR)/usr/local/include",
+				);
 				INFOPLIST_FILE = "CordovaLibApp/CordovaLibApp-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/cordova-ios-hirjxekmjkchqifveonwrrdrhjqd/Build/Products/Debug-iphoneos",
+				);
 				OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				TARGETED_DEVICE_FAMILY = "1,2";
@@ -636,6 +512,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/CordovaLibApp.app/CordovaLibApp";
+				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(SDKROOT)/Developer/Library/Frameworks",
@@ -647,6 +524,11 @@
 				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+					"$(BUILT_PRODUCTS_DIR)/usr/local/include",
+				);
 				INFOPLIST_FILE = "CordovaLibTests-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				ONLY_ACTIVE_ARCH = YES;
@@ -665,6 +547,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/CordovaLibApp.app/CordovaLibApp";
+				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(SDKROOT)/Developer/Library/Frameworks",
@@ -674,6 +557,11 @@
 				GCC_C_LANGUAGE_STANDARD = gnu99;
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+					"$(BUILT_PRODUCTS_DIR)/usr/local/include",
+				);
 				INFOPLIST_FILE = "CordovaLibTests-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				ONLY_ACTIVE_ARCH = NO;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/987c515c/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme
----------------------------------------------------------------------
diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme
index 41f6d8e..93ab0f3 100644
--- a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme
+++ b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme
@@ -90,7 +90,8 @@
       ignoresPersistentStateOnLaunch = "NO"
       debugDocumentVersioning = "YES"
       allowLocationSimulation = "YES">
-      <BuildableProductRunnable>
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
          <BuildableReference
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "303A4067152124BB00182201"
@@ -108,7 +109,8 @@
       useCustomWorkingDirectory = "NO"
       buildConfiguration = "Release"
       debugDocumentVersioning = "YES">
-      <BuildableProductRunnable>
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
          <BuildableReference
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "303A4067152124BB00182201"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[16/50] [abbrv] ios commit: CB-8643 - Drop iOS 6 support, minimum iOS 7

Posted by ia...@apache.org.
CB-8643 - Drop iOS 6 support, minimum iOS 7


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/1ffec81e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/1ffec81e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/1ffec81e

Branch: refs/heads/unplug-whitelist
Commit: 1ffec81e628817ca649a20e3394ac35626c8dbb3
Parents: 3112354
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Mar 16 16:15:25 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Mar 16 16:15:25 2015 -0700

----------------------------------------------------------------------
 bin/templates/project/__CLI__.xcodeproj/project.pbxproj     | 8 ++++----
 bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1ffec81e/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
index 4e6769f..f652e8d 100755
--- a/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__CLI__.xcodeproj/project.pbxproj
@@ -415,7 +415,7 @@
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				OTHER_LDFLAGS = (
 					"-weak_framework",
 					CoreFoundation,
@@ -445,7 +445,7 @@
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				OTHER_LDFLAGS = (
 					"-weak_framework",
 					CoreFoundation,
@@ -488,7 +488,7 @@
 					"\"$(OBJROOT)/UninstalledProducts/include\"",
 					"\"$(BUILT_PRODUCTS_DIR)\"",
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_LDFLAGS = (
 					"-weak_framework",
@@ -533,7 +533,7 @@
 					"\"$(OBJROOT)/UninstalledProducts/include\"",
 					"\"$(BUILT_PRODUCTS_DIR)\"",
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				OTHER_LDFLAGS = (
 					"-weak_framework",
 					CoreFoundation,

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1ffec81e/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
index 016cb4f..db2ef14 100755
--- a/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__NON-CLI__.xcodeproj/project.pbxproj
@@ -399,7 +399,7 @@
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				OTHER_LDFLAGS = (
 					"-weak_framework",
 					CoreFoundation,
@@ -429,7 +429,7 @@
 				GCC_THUMB_SUPPORT = NO;
 				GCC_VERSION = "";
 				INFOPLIST_FILE = "__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				OTHER_LDFLAGS = (
 					"-weak_framework",
 					CoreFoundation,
@@ -472,7 +472,7 @@
 					"\"$(OBJROOT)/UninstalledProducts/include\"",
 					"\"$(BUILT_PRODUCTS_DIR)\"",
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_LDFLAGS = (
 					"-weak_framework",
@@ -517,7 +517,7 @@
 					"\"$(OBJROOT)/UninstalledProducts/include\"",
 					"\"$(BUILT_PRODUCTS_DIR)\"",
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				OTHER_LDFLAGS = (
 					"-weak_framework",
 					CoreFoundation,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[28/50] [abbrv] ios commit: CB-8690 - Group files into folders in CordovaLib/Classes

Posted by ia...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index 4e444c8..e4f062d 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -7,108 +7,109 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F92F49E1314023E0046367C /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F92F49F1314023E0046367C /* CDVPluginResult.m */; };
-		301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 301F2F2914F3C9CA003FE9FC /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3034979A1513D56A0090E688 /* CDVLocalStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3034979B1513D56A0090E688 /* CDVLocalStorage.m */; };
-		30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		306A45021AB7B073003D6925 /* CDVPlugin+Resources.h in Headers */ = {isa = PBXBuildFile; fileRef = 306A45001AB7B073003D6925 /* CDVPlugin+Resources.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		306A45031AB7B073003D6925 /* CDVPlugin+Resources.m in Sources */ = {isa = PBXBuildFile; fileRef = 306A45011AB7B073003D6925 /* CDVPlugin+Resources.m */; };
-		306ADADD1AAA739800CAC885 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 306ADADC1AAA739800CAC885 /* CDVHandleOpenURL.h */; };
-		306ADAE01AAA73BA00CAC885 /* CDVHandleOpenURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 306ADADE1AAA73A800CAC885 /* CDVHandleOpenURL.m */; };
-		306ADAE51AAA73E100CAC885 /* CDVUIWebViewEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 306ADAE11AAA73E100CAC885 /* CDVUIWebViewEngine.m */; };
-		306ADAE61AAA73E100CAC885 /* CDVWebViewEngineProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 306ADAE21AAA73E100CAC885 /* CDVWebViewEngineProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		306ADAE71AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 306ADAE31AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		306ADAE81AAA73E100CAC885 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 306ADAE41AAA73E100CAC885 /* NSDictionary+CordovaPreferences.m */; };
-		306ADAEA1AAA745400CAC885 /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		306ADAEB1AAA747100CAC885 /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		306ADAEC1AAA753300CAC885 /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3073E9ED1656D51200957977 /* CDVScreenOrientationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3073E9EC1656D51200957977 /* CDVScreenOrientationDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C6847E1406CB38004C1A8E /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C6847F1406CB38004C1A8E /* CDVWhitelist.m */; };
-		30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C684921407044A004C1A8E /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C684931407044A004C1A8E /* CDVURLProtocol.m */; };
-		30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E33AF013A7E24B00594D64 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E33AF113A7E24B00594D64 /* CDVPlugin.m */; };
-		30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */; };
-		30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E14B5A81705050A0032169E /* CDVTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E14B5A61705050A0032169E /* CDVTimer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E14B5A91705050A0032169E /* CDVTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E14B5A71705050A0032169E /* CDVTimer.m */; };
-		7E5D94151AB23DB400F4D9EB /* CDVPlugin+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E5D94141AB23DB400F4D9EB /* CDVPlugin+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		7E5D94181AB250F800F4D9EB /* CDVAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E5D94161AB250F800F4D9EB /* CDVAppDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E5D94191AB250F800F4D9EB /* CDVAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E5D94171AB250F800F4D9EB /* CDVAppDelegate.m */; };
-		8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
-		8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */; };
-		8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD511090FBE7009987E8 /* NSData+Base64.m */; };
-		EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */; };
-		EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */; };
-		EB6A98401A729CD70013FCDB /* CDVAvailabilityDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = EB6A983F1A729CD70013FCDB /* CDVAvailabilityDeprecated.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		EB6A98541A77EE470013FCDB /* CDVJSON_private.m in Sources */ = {isa = PBXBuildFile; fileRef = EB6A98521A77EE470013FCDB /* CDVJSON_private.m */; };
-		EB6A98571A77FA430013FCDB /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD501090FBE7009987E8 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		EB96673B16A8970A00D86CDF /* CDVUserAgentUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = EB96673916A8970900D86CDF /* CDVUserAgentUtil.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		EB96673C16A8970A00D86CDF /* CDVUserAgentUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = EB96673A16A8970900D86CDF /* CDVUserAgentUtil.m */; };
-		EBFF4DBC16D3FE2E008F452B /* CDVUIWebViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EBFF4DBA16D3FE2E008F452B /* CDVUIWebViewDelegate.m */; };
-		EBFF4DBD16D3FE2E008F452B /* CDVUIWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = EBFF4DBB16D3FE2E008F452B /* CDVUIWebViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		F858FBC6166009A8007DA594 /* CDVConfigParser.h in Headers */ = {isa = PBXBuildFile; fileRef = F858FBC4166009A8007DA594 /* CDVConfigParser.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		F858FBC7166009A8007DA594 /* CDVConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F858FBC5166009A8007DA594 /* CDVConfigParser.m */; };
+		7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF21AB9028C008C4574 /* CDVDebug.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		7ED95D041AB9028C008C4574 /* CDVJSON_private.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF41AB9028C008C4574 /* CDVJSON_private.m */; };
+		7ED95D051AB9028C008C4574 /* CDVPlugin+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF51AB9028C008C4574 /* CDVPlugin+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		7ED95D071AB9028C008C4574 /* CDVHandleOpenURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF91AB9028C008C4574 /* CDVHandleOpenURL.m */; };
+		7ED95D091AB9028C008C4574 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CFC1AB9028C008C4574 /* CDVLocalStorage.m */; };
+		7ED95D0A1AB9028C008C4574 /* CDVUIWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */; };
+		7ED95D0B1AB9028C008C4574 /* CDVUIWebViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CFF1AB9028C008C4574 /* CDVUIWebViewDelegate.m */; };
+		7ED95D0D1AB9028C008C4574 /* CDVUIWebViewEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D011AB9028C008C4574 /* CDVUIWebViewEngine.m */; };
+		7ED95D351AB9029B008C4574 /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D0F1AB9029B008C4574 /* CDV.h */; };
+		7ED95D361AB9029B008C4574 /* CDVAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D101AB9029B008C4574 /* CDVAppDelegate.h */; };
+		7ED95D371AB9029B008C4574 /* CDVAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D111AB9029B008C4574 /* CDVAppDelegate.m */; };
+		7ED95D381AB9029B008C4574 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D121AB9029B008C4574 /* CDVAvailability.h */; };
+		7ED95D391AB9029B008C4574 /* CDVAvailabilityDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D131AB9029B008C4574 /* CDVAvailabilityDeprecated.h */; };
+		7ED95D3A1AB9029B008C4574 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D141AB9029B008C4574 /* CDVCommandDelegate.h */; };
+		7ED95D3B1AB9029B008C4574 /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D151AB9029B008C4574 /* CDVCommandDelegateImpl.h */; };
+		7ED95D3C1AB9029B008C4574 /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D161AB9029B008C4574 /* CDVCommandDelegateImpl.m */; };
+		7ED95D3D1AB9029B008C4574 /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D171AB9029B008C4574 /* CDVCommandQueue.h */; };
+		7ED95D3E1AB9029B008C4574 /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D181AB9029B008C4574 /* CDVCommandQueue.m */; };
+		7ED95D3F1AB9029B008C4574 /* CDVConfigParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D191AB9029B008C4574 /* CDVConfigParser.h */; };
+		7ED95D401AB9029B008C4574 /* CDVConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1A1AB9029B008C4574 /* CDVConfigParser.m */; };
+		7ED95D411AB9029B008C4574 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1B1AB9029B008C4574 /* CDVInvokedUrlCommand.h */; };
+		7ED95D421AB9029B008C4574 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1C1AB9029B008C4574 /* CDVInvokedUrlCommand.m */; };
+		7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1D1AB9029B008C4574 /* CDVPlugin+Resources.h */; };
+		7ED95D441AB9029B008C4574 /* CDVPlugin+Resources.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1E1AB9029B008C4574 /* CDVPlugin+Resources.m */; };
+		7ED95D451AB9029B008C4574 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1F1AB9029B008C4574 /* CDVPlugin.h */; };
+		7ED95D461AB9029B008C4574 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D201AB9029B008C4574 /* CDVPlugin.m */; };
+		7ED95D471AB9029B008C4574 /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D211AB9029B008C4574 /* CDVPluginResult.h */; };
+		7ED95D481AB9029B008C4574 /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D221AB9029B008C4574 /* CDVPluginResult.m */; };
+		7ED95D491AB9029B008C4574 /* CDVScreenOrientationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D231AB9029B008C4574 /* CDVScreenOrientationDelegate.h */; };
+		7ED95D4A1AB9029B008C4574 /* CDVTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D241AB9029B008C4574 /* CDVTimer.h */; };
+		7ED95D4B1AB9029B008C4574 /* CDVTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D251AB9029B008C4574 /* CDVTimer.m */; };
+		7ED95D4C1AB9029B008C4574 /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D261AB9029B008C4574 /* CDVURLProtocol.h */; };
+		7ED95D4D1AB9029B008C4574 /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D271AB9029B008C4574 /* CDVURLProtocol.m */; };
+		7ED95D4E1AB9029B008C4574 /* CDVUserAgentUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D281AB9029B008C4574 /* CDVUserAgentUtil.h */; };
+		7ED95D4F1AB9029B008C4574 /* CDVUserAgentUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D291AB9029B008C4574 /* CDVUserAgentUtil.m */; };
+		7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2A1AB9029B008C4574 /* CDVViewController.h */; };
+		7ED95D511AB9029B008C4574 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2B1AB9029B008C4574 /* CDVViewController.m */; };
+		7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */; };
+		7ED95D531AB9029B008C4574 /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */; };
+		7ED95D541AB9029B008C4574 /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */; };
+		7ED95D551AB9029B008C4574 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2F1AB9029B008C4574 /* NSData+Base64.h */; };
+		7ED95D561AB9029B008C4574 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D301AB9029B008C4574 /* NSData+Base64.m */; };
+		7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */; };
+		7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */; };
+		7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */; };
+		7ED95D5A1AB9029B008C4574 /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
-		1F92F49E1314023E0046367C /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPluginResult.h; path = Classes/CDVPluginResult.h; sourceTree = "<group>"; };
-		1F92F49F1314023E0046367C /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPluginResult.m; path = Classes/CDVPluginResult.m; sourceTree = "<group>"; };
-		301F2F2914F3C9CA003FE9FC /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDV.h; path = Classes/CDV.h; sourceTree = "<group>"; };
-		302965BB13A94E9D007046C5 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebug.h; path = Classes/CDVDebug.h; sourceTree = "<group>"; };
 		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
-		3034979A1513D56A0090E688 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocalStorage.h; path = Classes/CDVLocalStorage.h; sourceTree = "<group>"; };
-		3034979B1513D56A0090E688 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocalStorage.m; path = Classes/CDVLocalStorage.m; sourceTree = "<group>"; };
-		30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailability.h; path = Classes/CDVAvailability.h; sourceTree = "<group>"; };
-		306A45001AB7B073003D6925 /* CDVPlugin+Resources.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CDVPlugin+Resources.h"; path = "Classes/CDVPlugin+Resources.h"; sourceTree = "<group>"; };
-		306A45011AB7B073003D6925 /* CDVPlugin+Resources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "CDVPlugin+Resources.m"; path = "Classes/CDVPlugin+Resources.m"; sourceTree = "<group>"; };
-		306ADADC1AAA739800CAC885 /* CDVHandleOpenURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVHandleOpenURL.h; path = Classes/CDVHandleOpenURL.h; sourceTree = "<group>"; };
-		306ADADE1AAA73A800CAC885 /* CDVHandleOpenURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVHandleOpenURL.m; path = Classes/CDVHandleOpenURL.m; sourceTree = "<group>"; };
-		306ADAE11AAA73E100CAC885 /* CDVUIWebViewEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVUIWebViewEngine.m; path = Classes/CDVUIWebViewEngine.m; sourceTree = "<group>"; };
-		306ADAE21AAA73E100CAC885 /* CDVWebViewEngineProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWebViewEngineProtocol.h; path = Classes/CDVWebViewEngineProtocol.h; sourceTree = "<group>"; };
-		306ADAE31AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+CordovaPreferences.h"; path = "Classes/NSDictionary+CordovaPreferences.h"; sourceTree = "<group>"; };
-		306ADAE41AAA73E100CAC885 /* NSDictionary+CordovaPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+CordovaPreferences.m"; path = "Classes/NSDictionary+CordovaPreferences.m"; sourceTree = "<group>"; };
-		3073E9EC1656D51200957977 /* CDVScreenOrientationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVScreenOrientationDelegate.h; path = Classes/CDVScreenOrientationDelegate.h; sourceTree = "<group>"; };
-		30C6847E1406CB38004C1A8E /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWhitelist.h; path = Classes/CDVWhitelist.h; sourceTree = "<group>"; };
-		30C6847F1406CB38004C1A8E /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVWhitelist.m; path = Classes/CDVWhitelist.m; sourceTree = "<group>"; };
-		30C684921407044A004C1A8E /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVURLProtocol.h; path = Classes/CDVURLProtocol.h; sourceTree = "<group>"; };
-		30C684931407044A004C1A8E /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVURLProtocol.m; path = Classes/CDVURLProtocol.m; sourceTree = "<group>"; };
-		30E33AF013A7E24B00594D64 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPlugin.h; path = Classes/CDVPlugin.h; sourceTree = "<group>"; };
-		30E33AF113A7E24B00594D64 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPlugin.m; path = Classes/CDVPlugin.m; sourceTree = "<group>"; };
-		30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+QueueAdditions.h"; path = "Classes/NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
-		30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+QueueAdditions.m"; path = "Classes/NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
-		30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegate.h; path = Classes/CDVCommandDelegate.h; sourceTree = "<group>"; };
 		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		7E14B5A61705050A0032169E /* CDVTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVTimer.h; path = Classes/CDVTimer.h; sourceTree = "<group>"; };
-		7E14B5A71705050A0032169E /* CDVTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVTimer.m; path = Classes/CDVTimer.m; sourceTree = "<group>"; };
-		7E5D94141AB23DB400F4D9EB /* CDVPlugin+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CDVPlugin+Private.h"; path = "Classes/CDVPlugin+Private.h"; sourceTree = "<group>"; };
-		7E5D94161AB250F800F4D9EB /* CDVAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAppDelegate.h; path = Classes/CDVAppDelegate.h; sourceTree = "<group>"; };
-		7E5D94171AB250F800F4D9EB /* CDVAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVAppDelegate.m; path = Classes/CDVAppDelegate.m; sourceTree = "<group>"; };
-		8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
-		8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
-		8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVInvokedUrlCommand.h; path = Classes/CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
-		8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVInvokedUrlCommand.m; path = Classes/CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
-		8887FD501090FBE7009987E8 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+Base64.h"; path = "Classes/NSData+Base64.h"; sourceTree = "<group>"; };
-		8887FD511090FBE7009987E8 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+Base64.m"; path = "Classes/NSData+Base64.m"; sourceTree = "<group>"; };
+		7ED95CF21AB9028C008C4574 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVDebug.h; sourceTree = "<group>"; };
+		7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVJSON_private.h; sourceTree = "<group>"; };
+		7ED95CF41AB9028C008C4574 /* CDVJSON_private.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVJSON_private.m; sourceTree = "<group>"; };
+		7ED95CF51AB9028C008C4574 /* CDVPlugin+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CDVPlugin+Private.h"; sourceTree = "<group>"; };
+		7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVHandleOpenURL.h; sourceTree = "<group>"; };
+		7ED95CF91AB9028C008C4574 /* CDVHandleOpenURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVHandleOpenURL.m; sourceTree = "<group>"; };
+		7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVLocalStorage.h; sourceTree = "<group>"; };
+		7ED95CFC1AB9028C008C4574 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVLocalStorage.m; sourceTree = "<group>"; };
+		7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVUIWebViewDelegate.h; sourceTree = "<group>"; };
+		7ED95CFF1AB9028C008C4574 /* CDVUIWebViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVUIWebViewDelegate.m; sourceTree = "<group>"; };
+		7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVUIWebViewEngine.h; sourceTree = "<group>"; };
+		7ED95D011AB9028C008C4574 /* CDVUIWebViewEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVUIWebViewEngine.m; sourceTree = "<group>"; };
+		7ED95D0F1AB9029B008C4574 /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDV.h; sourceTree = "<group>"; };
+		7ED95D101AB9029B008C4574 /* CDVAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVAppDelegate.h; sourceTree = "<group>"; };
+		7ED95D111AB9029B008C4574 /* CDVAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVAppDelegate.m; sourceTree = "<group>"; };
+		7ED95D121AB9029B008C4574 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVAvailability.h; sourceTree = "<group>"; };
+		7ED95D131AB9029B008C4574 /* CDVAvailabilityDeprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVAvailabilityDeprecated.h; sourceTree = "<group>"; };
+		7ED95D141AB9029B008C4574 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandDelegate.h; sourceTree = "<group>"; };
+		7ED95D151AB9029B008C4574 /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
+		7ED95D161AB9029B008C4574 /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
+		7ED95D171AB9029B008C4574 /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandQueue.h; sourceTree = "<group>"; };
+		7ED95D181AB9029B008C4574 /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVCommandQueue.m; sourceTree = "<group>"; };
+		7ED95D191AB9029B008C4574 /* CDVConfigParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVConfigParser.h; sourceTree = "<group>"; };
+		7ED95D1A1AB9029B008C4574 /* CDVConfigParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVConfigParser.m; sourceTree = "<group>"; };
+		7ED95D1B1AB9029B008C4574 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
+		7ED95D1C1AB9029B008C4574 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
+		7ED95D1D1AB9029B008C4574 /* CDVPlugin+Resources.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CDVPlugin+Resources.h"; sourceTree = "<group>"; };
+		7ED95D1E1AB9029B008C4574 /* CDVPlugin+Resources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CDVPlugin+Resources.m"; sourceTree = "<group>"; };
+		7ED95D1F1AB9029B008C4574 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVPlugin.h; sourceTree = "<group>"; };
+		7ED95D201AB9029B008C4574 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVPlugin.m; sourceTree = "<group>"; };
+		7ED95D211AB9029B008C4574 /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVPluginResult.h; sourceTree = "<group>"; };
+		7ED95D221AB9029B008C4574 /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVPluginResult.m; sourceTree = "<group>"; };
+		7ED95D231AB9029B008C4574 /* CDVScreenOrientationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVScreenOrientationDelegate.h; sourceTree = "<group>"; };
+		7ED95D241AB9029B008C4574 /* CDVTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVTimer.h; sourceTree = "<group>"; };
+		7ED95D251AB9029B008C4574 /* CDVTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVTimer.m; sourceTree = "<group>"; };
+		7ED95D261AB9029B008C4574 /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVURLProtocol.h; sourceTree = "<group>"; };
+		7ED95D271AB9029B008C4574 /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVURLProtocol.m; sourceTree = "<group>"; };
+		7ED95D281AB9029B008C4574 /* CDVUserAgentUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVUserAgentUtil.h; sourceTree = "<group>"; };
+		7ED95D291AB9029B008C4574 /* CDVUserAgentUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVUserAgentUtil.m; sourceTree = "<group>"; };
+		7ED95D2A1AB9029B008C4574 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVViewController.h; sourceTree = "<group>"; };
+		7ED95D2B1AB9029B008C4574 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVViewController.m; sourceTree = "<group>"; };
+		7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewEngineProtocol.h; sourceTree = "<group>"; };
+		7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWhitelist.h; sourceTree = "<group>"; };
+		7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWhitelist.m; sourceTree = "<group>"; };
+		7ED95D2F1AB9029B008C4574 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Base64.h"; sourceTree = "<group>"; };
+		7ED95D301AB9029B008C4574 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Base64.m"; sourceTree = "<group>"; };
+		7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+CordovaPreferences.h"; sourceTree = "<group>"; };
+		7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+CordovaPreferences.m"; sourceTree = "<group>"; };
+		7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
+		7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
 		AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CordovaLib_Prefix.pch; sourceTree = SOURCE_ROOT; };
-		EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandQueue.h; path = Classes/CDVCommandQueue.h; sourceTree = "<group>"; };
-		EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandQueue.m; path = Classes/CDVCommandQueue.m; sourceTree = "<group>"; };
-		EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegateImpl.h; path = Classes/CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
-		EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandDelegateImpl.m; path = Classes/CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
-		EB6A983F1A729CD70013FCDB /* CDVAvailabilityDeprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailabilityDeprecated.h; path = Classes/CDVAvailabilityDeprecated.h; sourceTree = "<group>"; };
-		EB6A98521A77EE470013FCDB /* CDVJSON_private.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVJSON_private.m; path = Classes/CDVJSON_private.m; sourceTree = "<group>"; };
-		EB6A98531A77EE470013FCDB /* CDVJSON_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVJSON_private.h; path = Classes/CDVJSON_private.h; sourceTree = "<group>"; };
-		EB96673916A8970900D86CDF /* CDVUserAgentUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVUserAgentUtil.h; path = Classes/CDVUserAgentUtil.h; sourceTree = "<group>"; };
-		EB96673A16A8970900D86CDF /* CDVUserAgentUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVUserAgentUtil.m; path = Classes/CDVUserAgentUtil.m; sourceTree = "<group>"; };
-		EBFF4DBA16D3FE2E008F452B /* CDVUIWebViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVUIWebViewDelegate.m; path = Classes/CDVUIWebViewDelegate.m; sourceTree = "<group>"; };
-		EBFF4DBB16D3FE2E008F452B /* CDVUIWebViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVUIWebViewDelegate.h; path = Classes/CDVUIWebViewDelegate.h; sourceTree = "<group>"; };
-		F858FBC4166009A8007DA594 /* CDVConfigParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVConfigParser.h; path = Classes/CDVConfigParser.h; sourceTree = "<group>"; };
-		F858FBC5166009A8007DA594 /* CDVConfigParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVConfigParser.m; path = Classes/CDVConfigParser.m; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -133,76 +134,111 @@
 		0867D691FE84028FC02AAC07 /* CordovaLib */ = {
 			isa = PBXGroup;
 			children = (
-				888700D710922F56009987E8 /* Public */,
-				888700D910923009009987E8 /* Private */,
+				7ED95D0E1AB9029B008C4574 /* Public */,
+				7ED95CF11AB9028C008C4574 /* Private */,
 				034768DFFF38A50411DB9C8B /* Products */,
 				30325A0B136B343700982B63 /* VERSION */,
 			);
 			name = CordovaLib;
 			sourceTree = "<group>";
 		};
-		888700D710922F56009987E8 /* Public */ = {
+		7ED95CF11AB9028C008C4574 /* Private */ = {
 			isa = PBXGroup;
 			children = (
-				301F2F2914F3C9CA003FE9FC /* CDV.h */,
-				30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */,
-				EB6A983F1A729CD70013FCDB /* CDVAvailabilityDeprecated.h */,
-				30E33AF013A7E24B00594D64 /* CDVPlugin.h */,
-				30E33AF113A7E24B00594D64 /* CDVPlugin.m */,
-				1F92F49E1314023E0046367C /* CDVPluginResult.h */,
-				1F92F49F1314023E0046367C /* CDVPluginResult.m */,
-				8852C43614B65FD800F0E735 /* CDVViewController.h */,
-				8852C43714B65FD800F0E735 /* CDVViewController.m */,
-				30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */,
-				30C684921407044A004C1A8E /* CDVURLProtocol.h */,
-				30C684931407044A004C1A8E /* CDVURLProtocol.m */,
-				8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */,
-				8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */,
-				30C6847E1406CB38004C1A8E /* CDVWhitelist.h */,
-				30C6847F1406CB38004C1A8E /* CDVWhitelist.m */,
-				3034979A1513D56A0090E688 /* CDVLocalStorage.h */,
-				3034979B1513D56A0090E688 /* CDVLocalStorage.m */,
-				3073E9EC1656D51200957977 /* CDVScreenOrientationDelegate.h */,
-				7E14B5A61705050A0032169E /* CDVTimer.h */,
-				7E14B5A71705050A0032169E /* CDVTimer.m */,
-				F858FBC4166009A8007DA594 /* CDVConfigParser.h */,
-				F858FBC5166009A8007DA594 /* CDVConfigParser.m */,
-				EB96673916A8970900D86CDF /* CDVUserAgentUtil.h */,
-				EB96673A16A8970900D86CDF /* CDVUserAgentUtil.m */,
-				EBFF4DBA16D3FE2E008F452B /* CDVUIWebViewDelegate.m */,
-				EBFF4DBB16D3FE2E008F452B /* CDVUIWebViewDelegate.h */,
-				8887FD501090FBE7009987E8 /* NSData+Base64.h */,
-				8887FD511090FBE7009987E8 /* NSData+Base64.m */,
-				306ADAE21AAA73E100CAC885 /* CDVWebViewEngineProtocol.h */,
-				7E5D94161AB250F800F4D9EB /* CDVAppDelegate.h */,
-				7E5D94171AB250F800F4D9EB /* CDVAppDelegate.m */,
-				306A45001AB7B073003D6925 /* CDVPlugin+Resources.h */,
-				306A45011AB7B073003D6925 /* CDVPlugin+Resources.m */,
-				306ADAE31AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h */,
-				306ADAE41AAA73E100CAC885 /* NSDictionary+CordovaPreferences.m */,
+				AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */,
+				7ED95CF21AB9028C008C4574 /* CDVDebug.h */,
+				7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */,
+				7ED95CF41AB9028C008C4574 /* CDVJSON_private.m */,
+				7ED95CF51AB9028C008C4574 /* CDVPlugin+Private.h */,
+				7ED95CF61AB9028C008C4574 /* Plugins */,
 			);
-			name = Public;
+			name = Private;
+			path = Classes/Private;
 			sourceTree = "<group>";
 		};
-		888700D910923009009987E8 /* Private */ = {
+		7ED95CF61AB9028C008C4574 /* Plugins */ = {
 			isa = PBXGroup;
 			children = (
-				306ADAE11AAA73E100CAC885 /* CDVUIWebViewEngine.m */,
-				306ADADE1AAA73A800CAC885 /* CDVHandleOpenURL.m */,
-				306ADADC1AAA739800CAC885 /* CDVHandleOpenURL.h */,
-				302965BB13A94E9D007046C5 /* CDVDebug.h */,
-				30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */,
-				30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */,
-				EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */,
-				EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */,
-				EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */,
-				EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */,
-				EB6A98521A77EE470013FCDB /* CDVJSON_private.m */,
-				EB6A98531A77EE470013FCDB /* CDVJSON_private.h */,
-				AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */,
-				7E5D94141AB23DB400F4D9EB /* CDVPlugin+Private.h */,
+				7ED95CF71AB9028C008C4574 /* CDVHandleOpenURL */,
+				7ED95CFA1AB9028C008C4574 /* CDVLocalStorage */,
+				7ED95CFD1AB9028C008C4574 /* CDVUIWebViewEngine */,
 			);
-			name = Private;
+			path = Plugins;
+			sourceTree = "<group>";
+		};
+		7ED95CF71AB9028C008C4574 /* CDVHandleOpenURL */ = {
+			isa = PBXGroup;
+			children = (
+				7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */,
+				7ED95CF91AB9028C008C4574 /* CDVHandleOpenURL.m */,
+			);
+			path = CDVHandleOpenURL;
+			sourceTree = "<group>";
+		};
+		7ED95CFA1AB9028C008C4574 /* CDVLocalStorage */ = {
+			isa = PBXGroup;
+			children = (
+				7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */,
+				7ED95CFC1AB9028C008C4574 /* CDVLocalStorage.m */,
+			);
+			path = CDVLocalStorage;
+			sourceTree = "<group>";
+		};
+		7ED95CFD1AB9028C008C4574 /* CDVUIWebViewEngine */ = {
+			isa = PBXGroup;
+			children = (
+				7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */,
+				7ED95CFF1AB9028C008C4574 /* CDVUIWebViewDelegate.m */,
+				7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */,
+				7ED95D011AB9028C008C4574 /* CDVUIWebViewEngine.m */,
+			);
+			path = CDVUIWebViewEngine;
+			sourceTree = "<group>";
+		};
+		7ED95D0E1AB9029B008C4574 /* Public */ = {
+			isa = PBXGroup;
+			children = (
+				7ED95D0F1AB9029B008C4574 /* CDV.h */,
+				7ED95D101AB9029B008C4574 /* CDVAppDelegate.h */,
+				7ED95D111AB9029B008C4574 /* CDVAppDelegate.m */,
+				7ED95D121AB9029B008C4574 /* CDVAvailability.h */,
+				7ED95D131AB9029B008C4574 /* CDVAvailabilityDeprecated.h */,
+				7ED95D141AB9029B008C4574 /* CDVCommandDelegate.h */,
+				7ED95D151AB9029B008C4574 /* CDVCommandDelegateImpl.h */,
+				7ED95D161AB9029B008C4574 /* CDVCommandDelegateImpl.m */,
+				7ED95D171AB9029B008C4574 /* CDVCommandQueue.h */,
+				7ED95D181AB9029B008C4574 /* CDVCommandQueue.m */,
+				7ED95D191AB9029B008C4574 /* CDVConfigParser.h */,
+				7ED95D1A1AB9029B008C4574 /* CDVConfigParser.m */,
+				7ED95D1B1AB9029B008C4574 /* CDVInvokedUrlCommand.h */,
+				7ED95D1C1AB9029B008C4574 /* CDVInvokedUrlCommand.m */,
+				7ED95D1D1AB9029B008C4574 /* CDVPlugin+Resources.h */,
+				7ED95D1E1AB9029B008C4574 /* CDVPlugin+Resources.m */,
+				7ED95D1F1AB9029B008C4574 /* CDVPlugin.h */,
+				7ED95D201AB9029B008C4574 /* CDVPlugin.m */,
+				7ED95D211AB9029B008C4574 /* CDVPluginResult.h */,
+				7ED95D221AB9029B008C4574 /* CDVPluginResult.m */,
+				7ED95D231AB9029B008C4574 /* CDVScreenOrientationDelegate.h */,
+				7ED95D241AB9029B008C4574 /* CDVTimer.h */,
+				7ED95D251AB9029B008C4574 /* CDVTimer.m */,
+				7ED95D261AB9029B008C4574 /* CDVURLProtocol.h */,
+				7ED95D271AB9029B008C4574 /* CDVURLProtocol.m */,
+				7ED95D281AB9029B008C4574 /* CDVUserAgentUtil.h */,
+				7ED95D291AB9029B008C4574 /* CDVUserAgentUtil.m */,
+				7ED95D2A1AB9029B008C4574 /* CDVViewController.h */,
+				7ED95D2B1AB9029B008C4574 /* CDVViewController.m */,
+				7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */,
+				7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */,
+				7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */,
+				7ED95D2F1AB9029B008C4574 /* NSData+Base64.h */,
+				7ED95D301AB9029B008C4574 /* NSData+Base64.m */,
+				7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */,
+				7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */,
+				7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */,
+				7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */,
+			);
+			name = Public;
+			path = Classes/Public;
 			sourceTree = "<group>";
 		};
 /* End PBXGroup section */
@@ -212,32 +248,32 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */,
-				30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */,
-				EB6A98401A729CD70013FCDB /* CDVAvailabilityDeprecated.h in Headers */,
-				30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */,
-				1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */,
-				8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */,
-				30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */,
-				30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
-				8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */,
-				30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */,
-				3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */,
-				306ADADD1AAA739800CAC885 /* CDVHandleOpenURL.h in Headers */,
-				3073E9ED1656D51200957977 /* CDVScreenOrientationDelegate.h in Headers */,
-				7E14B5A81705050A0032169E /* CDVTimer.h in Headers */,
-				F858FBC6166009A8007DA594 /* CDVConfigParser.h in Headers */,
-				306ADAE61AAA73E100CAC885 /* CDVWebViewEngineProtocol.h in Headers */,
-				EB96673B16A8970A00D86CDF /* CDVUserAgentUtil.h in Headers */,
-				306ADAEA1AAA745400CAC885 /* CDVCommandQueue.h in Headers */,
-				7E5D94181AB250F800F4D9EB /* CDVAppDelegate.h in Headers */,
-				7E5D94151AB23DB400F4D9EB /* CDVPlugin+Private.h in Headers */,
-				306ADAE71AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h in Headers */,
-				EB6A98571A77FA430013FCDB /* NSData+Base64.h in Headers */,
-				306A45021AB7B073003D6925 /* CDVPlugin+Resources.h in Headers */,
-				EBFF4DBD16D3FE2E008F452B /* CDVUIWebViewDelegate.h in Headers */,
-				306ADAEB1AAA747100CAC885 /* NSMutableArray+QueueAdditions.h in Headers */,
-				306ADAEC1AAA753300CAC885 /* CDVCommandDelegateImpl.h in Headers */,
+				7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */,
+				7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */,
+				7ED95D051AB9028C008C4574 /* CDVPlugin+Private.h in Headers */,
+				7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */,
+				7ED95D491AB9029B008C4574 /* CDVScreenOrientationDelegate.h in Headers */,
+				7ED95D351AB9029B008C4574 /* CDV.h in Headers */,
+				7ED95D3B1AB9029B008C4574 /* CDVCommandDelegateImpl.h in Headers */,
+				7ED95D3D1AB9029B008C4574 /* CDVCommandQueue.h in Headers */,
+				7ED95D531AB9029B008C4574 /* CDVWhitelist.h in Headers */,
+				7ED95D361AB9029B008C4574 /* CDVAppDelegate.h in Headers */,
+				7ED95D551AB9029B008C4574 /* NSData+Base64.h in Headers */,
+				7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */,
+				7ED95D381AB9029B008C4574 /* CDVAvailability.h in Headers */,
+				7ED95D0A1AB9028C008C4574 /* CDVUIWebViewDelegate.h in Headers */,
+				7ED95D471AB9029B008C4574 /* CDVPluginResult.h in Headers */,
+				7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */,
+				7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */,
+				7ED95D411AB9029B008C4574 /* CDVInvokedUrlCommand.h in Headers */,
+				7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */,
+				7ED95D451AB9029B008C4574 /* CDVPlugin.h in Headers */,
+				7ED95D4C1AB9029B008C4574 /* CDVURLProtocol.h in Headers */,
+				7ED95D3A1AB9029B008C4574 /* CDVCommandDelegate.h in Headers */,
+				7ED95D391AB9029B008C4574 /* CDVAvailabilityDeprecated.h in Headers */,
+				7ED95D4E1AB9029B008C4574 /* CDVUserAgentUtil.h in Headers */,
+				7ED95D4A1AB9029B008C4574 /* CDVTimer.h in Headers */,
+				7ED95D3F1AB9029B008C4574 /* CDVConfigParser.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -295,27 +331,27 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */,
-				8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */,
-				306ADAE81AAA73E100CAC885 /* NSDictionary+CordovaPreferences.m in Sources */,
-				1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */,
-				30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */,
-				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
-				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
-				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
-				7E5D94191AB250F800F4D9EB /* CDVAppDelegate.m in Sources */,
-				306A45031AB7B073003D6925 /* CDVPlugin+Resources.m in Sources */,
-				8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
-				3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
-				306ADAE51AAA73E100CAC885 /* CDVUIWebViewEngine.m in Sources */,
-				EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */,
-				EB6A98541A77EE470013FCDB /* CDVJSON_private.m in Sources */,
-				EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */,
-				F858FBC7166009A8007DA594 /* CDVConfigParser.m in Sources */,
-				EB96673C16A8970A00D86CDF /* CDVUserAgentUtil.m in Sources */,
-				306ADAE01AAA73BA00CAC885 /* CDVHandleOpenURL.m in Sources */,
-				EBFF4DBC16D3FE2E008F452B /* CDVUIWebViewDelegate.m in Sources */,
-				7E14B5A91705050A0032169E /* CDVTimer.m in Sources */,
+				7ED95D561AB9029B008C4574 /* NSData+Base64.m in Sources */,
+				7ED95D511AB9029B008C4574 /* CDVViewController.m in Sources */,
+				7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */,
+				7ED95D371AB9029B008C4574 /* CDVAppDelegate.m in Sources */,
+				7ED95D0B1AB9028C008C4574 /* CDVUIWebViewDelegate.m in Sources */,
+				7ED95D3C1AB9029B008C4574 /* CDVCommandDelegateImpl.m in Sources */,
+				7ED95D041AB9028C008C4574 /* CDVJSON_private.m in Sources */,
+				7ED95D541AB9029B008C4574 /* CDVWhitelist.m in Sources */,
+				7ED95D421AB9029B008C4574 /* CDVInvokedUrlCommand.m in Sources */,
+				7ED95D4B1AB9029B008C4574 /* CDVTimer.m in Sources */,
+				7ED95D4F1AB9029B008C4574 /* CDVUserAgentUtil.m in Sources */,
+				7ED95D401AB9029B008C4574 /* CDVConfigParser.m in Sources */,
+				7ED95D071AB9028C008C4574 /* CDVHandleOpenURL.m in Sources */,
+				7ED95D5A1AB9029B008C4574 /* NSMutableArray+QueueAdditions.m in Sources */,
+				7ED95D3E1AB9029B008C4574 /* CDVCommandQueue.m in Sources */,
+				7ED95D481AB9029B008C4574 /* CDVPluginResult.m in Sources */,
+				7ED95D441AB9029B008C4574 /* CDVPlugin+Resources.m in Sources */,
+				7ED95D4D1AB9029B008C4574 /* CDVURLProtocol.m in Sources */,
+				7ED95D0D1AB9028C008C4574 /* CDVUIWebViewEngine.m in Sources */,
+				7ED95D461AB9029B008C4574 /* CDVPlugin.m in Sources */,
+				7ED95D091AB9028C008C4574 /* CDVLocalStorage.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[18/50] [abbrv] ios commit: CB-8640 - Template-ize CDVAvailability.h for coho release tool

Posted by ia...@apache.org.
CB-8640 - Template-ize CDVAvailability.h for coho release tool


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/1e500ce9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/1e500ce9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/1e500ce9

Branch: refs/heads/unplug-whitelist
Commit: 1e500ce9ff5b986a79e6508934795153264c0b5a
Parents: 98fcf66
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Mar 16 17:19:38 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Mar 16 17:19:38 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVAvailability.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1e500ce9/CordovaLib/Classes/CDVAvailability.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAvailability.h b/CordovaLib/Classes/CDVAvailability.h
index 41b3457..40d5489 100644
--- a/CordovaLib/Classes/CDVAvailability.h
+++ b/CordovaLib/Classes/CDVAvailability.h
@@ -56,16 +56,18 @@
 #define __CORDOVA_3_7_0 30700
 #define __CORDOVA_3_8_0 30800
 #define __CORDOVA_4_0_0 40000
+/* coho:next-version,insert-before */
 #define __CORDOVA_NA 99999      /* not available */
 
 /*
- #if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_1_7_0
-    // do something when its at least 1.7.0
+ #if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_4_0_0
+    // do something when its at least 4.0.0
  #else
-    // do something else (non 1.7.0)
+    // do something else (non 4.0.0)
  #endif
  */
 #ifndef CORDOVA_VERSION_MIN_REQUIRED
+    /* coho:next-version-min-required,replace-after */
     #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_4_0_0
 #endif
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[05/50] [abbrv] ios commit: CB-8464 - Remove non-ARC code in AppDelegate

Posted by ia...@apache.org.
CB-8464 - Remove non-ARC code in AppDelegate


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/4d60a630
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/4d60a630
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/4d60a630

Branch: refs/heads/unplug-whitelist
Commit: 4d60a630a203f149dff46c02cb59c0bd0438c082
Parents: 0053d35
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Mar 12 16:13:22 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Mar 12 16:13:22 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVAppDelegate.m | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4d60a630/CordovaLib/Classes/CDVAppDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAppDelegate.m b/CordovaLib/Classes/CDVAppDelegate.m
index ab81d7d..d582161 100644
--- a/CordovaLib/Classes/CDVAppDelegate.m
+++ b/CordovaLib/Classes/CDVAppDelegate.m
@@ -34,11 +34,7 @@
 
     int cacheSizeMemory = 8 * 1024 * 1024; // 8MB
     int cacheSizeDisk = 32 * 1024 * 1024; // 32MB
-#if __has_feature(objc_arc)
-        NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
-#else
-        NSURLCache* sharedCache = [[[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"] autorelease];
-#endif
+    NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
     [NSURLCache setSharedURLCache:sharedCache];
 
     self = [super init];
@@ -54,20 +50,12 @@
 {
     CGRect screenBounds = [[UIScreen mainScreen] bounds];
 
-#if __has_feature(objc_arc)
-        self.window = [[UIWindow alloc] initWithFrame:screenBounds];
-#else
-        self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
-#endif
+    self.window = [[UIWindow alloc] initWithFrame:screenBounds];
     self.window.autoresizesSubviews = YES;
 
     // only set if not already set in subclass
     if (self.viewController == nil) {
-#if __has_feature(objc_arc)
-            self.viewController = [[CDVViewController alloc] init];
-#else
-            self.viewController = [[[CDVViewController alloc] init] autorelease];
-#endif
+        self.viewController = [[CDVViewController alloc] init];
     }
 
     // Set your app's start page by setting the <content src='foo.html' /> tag in config.xml.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[19/50] [abbrv] ios commit: CB-7826 - Add CDVPlugin support for getting items from plugin resource bundles

Posted by ia...@apache.org.
CB-7826 - Add CDVPlugin support for getting items from plugin resource bundles


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/f55cfb41
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/f55cfb41
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/f55cfb41

Branch: refs/heads/unplug-whitelist
Commit: f55cfb41e5302bfd378eb04e5d2fc491b2ac3fbc
Parents: 1e500ce
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Mar 16 17:57:55 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Mar 16 17:57:55 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVPlugin+Resources.h        | 39 ++++++++++++++++++++
 CordovaLib/Classes/CDVPlugin+Resources.m        | 38 +++++++++++++++++++
 CordovaLib/Classes/CDVPlugin.m                  |  1 +
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj |  8 ++++
 4 files changed, 86 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/f55cfb41/CordovaLib/Classes/CDVPlugin+Resources.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin+Resources.h b/CordovaLib/Classes/CDVPlugin+Resources.h
new file mode 100644
index 0000000..cc43b16
--- /dev/null
+++ b/CordovaLib/Classes/CDVPlugin+Resources.h
@@ -0,0 +1,39 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <UIKit/UIKit.h>
+#import "CDVPlugin.h"
+
+@interface CDVPlugin (CDVPluginResources)
+
+/*
+ This will return the localized string for a key in a .bundle that is named the same as your class
+ For example, if your plugin class was called Foo, and you have a Spanish localized strings file, it will
+ try to load the desired key from Foo.bundle/es.lproj/Localizable.strings
+ */
+- (NSString*)pluginLocalizedString:(NSString*)key;
+
+/*
+ This will return the image for a name in a .bundle that is named the same as your class
+ For example, if your plugin class was called Foo, and you have an image called "bar",
+ it will try to load the image from Foo.bundle/bar.png (and appropriately named retina versions)
+ */
+- (UIImage*)pluginImageResource:(NSString*)name;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/f55cfb41/CordovaLib/Classes/CDVPlugin+Resources.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin+Resources.m b/CordovaLib/Classes/CDVPlugin+Resources.m
new file mode 100644
index 0000000..5690738
--- /dev/null
+++ b/CordovaLib/Classes/CDVPlugin+Resources.m
@@ -0,0 +1,38 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVPlugin+Resources.h"
+
+@implementation CDVPlugin (CDVPluginResources)
+
+- (NSString*)pluginLocalizedString:(NSString*)key
+{
+    NSBundle* bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:NSStringFromClass([self class]) ofType:@"bundle"]];
+
+    return [bundle localizedStringForKey:(key) value:nil table:nil];
+}
+
+- (UIImage*)pluginImageResource:(NSString*)name
+{
+    NSString* resourceIdentifier = [NSString stringWithFormat:@"%@.bundle/%@", NSStringFromClass([self class]), name];
+
+    return [UIImage imageNamed:resourceIdentifier];
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/f55cfb41/CordovaLib/Classes/CDVPlugin.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin.m b/CordovaLib/Classes/CDVPlugin.m
index 121e54c..ac3a8ee 100644
--- a/CordovaLib/Classes/CDVPlugin.m
+++ b/CordovaLib/Classes/CDVPlugin.m
@@ -19,6 +19,7 @@
 
 #import "CDVPlugin.h"
 #import "CDVPlugin+Private.h"
+#import "CDVPlugin+Resources.h"
 #import "CDVViewController.h"
 #include <objc/message.h>
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/f55cfb41/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index 2dbf054..2957580 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -13,6 +13,8 @@
 		3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3034979A1513D56A0090E688 /* CDVLocalStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3034979B1513D56A0090E688 /* CDVLocalStorage.m */; };
 		30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		306A45021AB7B073003D6925 /* CDVPlugin+Resources.h in Headers */ = {isa = PBXBuildFile; fileRef = 306A45001AB7B073003D6925 /* CDVPlugin+Resources.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		306A45031AB7B073003D6925 /* CDVPlugin+Resources.m in Sources */ = {isa = PBXBuildFile; fileRef = 306A45011AB7B073003D6925 /* CDVPlugin+Resources.m */; };
 		306ADADD1AAA739800CAC885 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 306ADADC1AAA739800CAC885 /* CDVHandleOpenURL.h */; };
 		306ADAE01AAA73BA00CAC885 /* CDVHandleOpenURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 306ADADE1AAA73A800CAC885 /* CDVHandleOpenURL.m */; };
 		306ADAE51AAA73E100CAC885 /* CDVUIWebViewEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 306ADAE11AAA73E100CAC885 /* CDVUIWebViewEngine.m */; };
@@ -63,6 +65,8 @@
 		3034979A1513D56A0090E688 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocalStorage.h; path = Classes/CDVLocalStorage.h; sourceTree = "<group>"; };
 		3034979B1513D56A0090E688 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocalStorage.m; path = Classes/CDVLocalStorage.m; sourceTree = "<group>"; };
 		30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailability.h; path = Classes/CDVAvailability.h; sourceTree = "<group>"; };
+		306A45001AB7B073003D6925 /* CDVPlugin+Resources.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CDVPlugin+Resources.h"; path = "Classes/CDVPlugin+Resources.h"; sourceTree = "<group>"; };
+		306A45011AB7B073003D6925 /* CDVPlugin+Resources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "CDVPlugin+Resources.m"; path = "Classes/CDVPlugin+Resources.m"; sourceTree = "<group>"; };
 		306ADADC1AAA739800CAC885 /* CDVHandleOpenURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVHandleOpenURL.h; path = Classes/CDVHandleOpenURL.h; sourceTree = "<group>"; };
 		306ADADE1AAA73A800CAC885 /* CDVHandleOpenURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVHandleOpenURL.m; path = Classes/CDVHandleOpenURL.m; sourceTree = "<group>"; };
 		306ADAE11AAA73E100CAC885 /* CDVUIWebViewEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVUIWebViewEngine.m; path = Classes/CDVUIWebViewEngine.m; sourceTree = "<group>"; };
@@ -172,6 +176,8 @@
 				306ADAE21AAA73E100CAC885 /* CDVWebViewEngineProtocol.h */,
 				7E5D94161AB250F800F4D9EB /* CDVAppDelegate.h */,
 				7E5D94171AB250F800F4D9EB /* CDVAppDelegate.m */,
+				306A45001AB7B073003D6925 /* CDVPlugin+Resources.h */,
+				306A45011AB7B073003D6925 /* CDVPlugin+Resources.m */,
 			);
 			name = Public;
 			sourceTree = "<group>";
@@ -228,6 +234,7 @@
 				7E5D94151AB23DB400F4D9EB /* CDVPlugin+Private.h in Headers */,
 				306ADAE71AAA73E100CAC885 /* NSDictionary+CordovaPreferences.h in Headers */,
 				EB6A98571A77FA430013FCDB /* NSData+Base64.h in Headers */,
+				306A45021AB7B073003D6925 /* CDVPlugin+Resources.h in Headers */,
 				EBFF4DBD16D3FE2E008F452B /* CDVUIWebViewDelegate.h in Headers */,
 				306ADAEB1AAA747100CAC885 /* NSMutableArray+QueueAdditions.h in Headers */,
 				306ADAEC1AAA753300CAC885 /* CDVCommandDelegateImpl.h in Headers */,
@@ -297,6 +304,7 @@
 				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
 				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
 				7E5D94191AB250F800F4D9EB /* CDVAppDelegate.m in Sources */,
+				306A45031AB7B073003D6925 /* CDVPlugin+Resources.m in Sources */,
 				8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
 				3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
 				306ADAE51AAA73E100CAC885 /* CDVUIWebViewEngine.m in Sources */,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[35/50] [abbrv] ios commit: CB-8690 - Exported headers were not in Public section, but Project. Moved.

Posted by ia...@apache.org.
CB-8690 -  Exported headers were not in Public section, but Project. Moved.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/c057eb77
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/c057eb77
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/c057eb77

Branch: refs/heads/unplug-whitelist
Commit: c057eb777c19cb11a110aabec9f2388f2fa54b34
Parents: d58fa4a
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Mar 17 23:24:20 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Mar 17 23:24:20 2015 -0700

----------------------------------------------------------------------
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj | 54 ++++++++++----------
 1 file changed, 27 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c057eb77/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index e4f062d..4c63262 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -13,46 +13,46 @@
 		7ED95D051AB9028C008C4574 /* CDVPlugin+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF51AB9028C008C4574 /* CDVPlugin+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7ED95D071AB9028C008C4574 /* CDVHandleOpenURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF91AB9028C008C4574 /* CDVHandleOpenURL.m */; };
 		7ED95D091AB9028C008C4574 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CFC1AB9028C008C4574 /* CDVLocalStorage.m */; };
-		7ED95D0A1AB9028C008C4574 /* CDVUIWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */; };
+		7ED95D0A1AB9028C008C4574 /* CDVUIWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D0B1AB9028C008C4574 /* CDVUIWebViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CFF1AB9028C008C4574 /* CDVUIWebViewDelegate.m */; };
 		7ED95D0D1AB9028C008C4574 /* CDVUIWebViewEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D011AB9028C008C4574 /* CDVUIWebViewEngine.m */; };
-		7ED95D351AB9029B008C4574 /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D0F1AB9029B008C4574 /* CDV.h */; };
-		7ED95D361AB9029B008C4574 /* CDVAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D101AB9029B008C4574 /* CDVAppDelegate.h */; };
+		7ED95D351AB9029B008C4574 /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D0F1AB9029B008C4574 /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		7ED95D361AB9029B008C4574 /* CDVAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D101AB9029B008C4574 /* CDVAppDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D371AB9029B008C4574 /* CDVAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D111AB9029B008C4574 /* CDVAppDelegate.m */; };
-		7ED95D381AB9029B008C4574 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D121AB9029B008C4574 /* CDVAvailability.h */; };
-		7ED95D391AB9029B008C4574 /* CDVAvailabilityDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D131AB9029B008C4574 /* CDVAvailabilityDeprecated.h */; };
-		7ED95D3A1AB9029B008C4574 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D141AB9029B008C4574 /* CDVCommandDelegate.h */; };
-		7ED95D3B1AB9029B008C4574 /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D151AB9029B008C4574 /* CDVCommandDelegateImpl.h */; };
+		7ED95D381AB9029B008C4574 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D121AB9029B008C4574 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		7ED95D391AB9029B008C4574 /* CDVAvailabilityDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D131AB9029B008C4574 /* CDVAvailabilityDeprecated.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		7ED95D3A1AB9029B008C4574 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D141AB9029B008C4574 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		7ED95D3B1AB9029B008C4574 /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D151AB9029B008C4574 /* CDVCommandDelegateImpl.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D3C1AB9029B008C4574 /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D161AB9029B008C4574 /* CDVCommandDelegateImpl.m */; };
-		7ED95D3D1AB9029B008C4574 /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D171AB9029B008C4574 /* CDVCommandQueue.h */; };
+		7ED95D3D1AB9029B008C4574 /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D171AB9029B008C4574 /* CDVCommandQueue.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D3E1AB9029B008C4574 /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D181AB9029B008C4574 /* CDVCommandQueue.m */; };
-		7ED95D3F1AB9029B008C4574 /* CDVConfigParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D191AB9029B008C4574 /* CDVConfigParser.h */; };
+		7ED95D3F1AB9029B008C4574 /* CDVConfigParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D191AB9029B008C4574 /* CDVConfigParser.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D401AB9029B008C4574 /* CDVConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1A1AB9029B008C4574 /* CDVConfigParser.m */; };
-		7ED95D411AB9029B008C4574 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1B1AB9029B008C4574 /* CDVInvokedUrlCommand.h */; };
+		7ED95D411AB9029B008C4574 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1B1AB9029B008C4574 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D421AB9029B008C4574 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1C1AB9029B008C4574 /* CDVInvokedUrlCommand.m */; };
-		7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1D1AB9029B008C4574 /* CDVPlugin+Resources.h */; };
+		7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1D1AB9029B008C4574 /* CDVPlugin+Resources.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D441AB9029B008C4574 /* CDVPlugin+Resources.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1E1AB9029B008C4574 /* CDVPlugin+Resources.m */; };
-		7ED95D451AB9029B008C4574 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1F1AB9029B008C4574 /* CDVPlugin.h */; };
+		7ED95D451AB9029B008C4574 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1F1AB9029B008C4574 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D461AB9029B008C4574 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D201AB9029B008C4574 /* CDVPlugin.m */; };
-		7ED95D471AB9029B008C4574 /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D211AB9029B008C4574 /* CDVPluginResult.h */; };
+		7ED95D471AB9029B008C4574 /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D211AB9029B008C4574 /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D481AB9029B008C4574 /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D221AB9029B008C4574 /* CDVPluginResult.m */; };
-		7ED95D491AB9029B008C4574 /* CDVScreenOrientationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D231AB9029B008C4574 /* CDVScreenOrientationDelegate.h */; };
-		7ED95D4A1AB9029B008C4574 /* CDVTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D241AB9029B008C4574 /* CDVTimer.h */; };
+		7ED95D491AB9029B008C4574 /* CDVScreenOrientationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D231AB9029B008C4574 /* CDVScreenOrientationDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		7ED95D4A1AB9029B008C4574 /* CDVTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D241AB9029B008C4574 /* CDVTimer.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D4B1AB9029B008C4574 /* CDVTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D251AB9029B008C4574 /* CDVTimer.m */; };
-		7ED95D4C1AB9029B008C4574 /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D261AB9029B008C4574 /* CDVURLProtocol.h */; };
+		7ED95D4C1AB9029B008C4574 /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D261AB9029B008C4574 /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D4D1AB9029B008C4574 /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D271AB9029B008C4574 /* CDVURLProtocol.m */; };
-		7ED95D4E1AB9029B008C4574 /* CDVUserAgentUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D281AB9029B008C4574 /* CDVUserAgentUtil.h */; };
+		7ED95D4E1AB9029B008C4574 /* CDVUserAgentUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D281AB9029B008C4574 /* CDVUserAgentUtil.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D4F1AB9029B008C4574 /* CDVUserAgentUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D291AB9029B008C4574 /* CDVUserAgentUtil.m */; };
-		7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2A1AB9029B008C4574 /* CDVViewController.h */; };
+		7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2A1AB9029B008C4574 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D511AB9029B008C4574 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2B1AB9029B008C4574 /* CDVViewController.m */; };
-		7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */; };
-		7ED95D531AB9029B008C4574 /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */; };
+		7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		7ED95D531AB9029B008C4574 /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D541AB9029B008C4574 /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */; };
-		7ED95D551AB9029B008C4574 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2F1AB9029B008C4574 /* NSData+Base64.h */; };
+		7ED95D551AB9029B008C4574 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2F1AB9029B008C4574 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D561AB9029B008C4574 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D301AB9029B008C4574 /* NSData+Base64.m */; };
-		7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */; };
+		7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */; };
-		7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */; };
+		7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7ED95D5A1AB9029B008C4574 /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */; };
 /* End PBXBuildFile section */
 
@@ -248,9 +248,6 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */,
-				7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */,
-				7ED95D051AB9028C008C4574 /* CDVPlugin+Private.h in Headers */,
 				7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */,
 				7ED95D491AB9029B008C4574 /* CDVScreenOrientationDelegate.h in Headers */,
 				7ED95D351AB9029B008C4574 /* CDV.h in Headers */,
@@ -263,7 +260,6 @@
 				7ED95D381AB9029B008C4574 /* CDVAvailability.h in Headers */,
 				7ED95D0A1AB9028C008C4574 /* CDVUIWebViewDelegate.h in Headers */,
 				7ED95D471AB9029B008C4574 /* CDVPluginResult.h in Headers */,
-				7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */,
 				7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */,
 				7ED95D411AB9029B008C4574 /* CDVInvokedUrlCommand.h in Headers */,
 				7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */,
@@ -274,6 +270,10 @@
 				7ED95D4E1AB9029B008C4574 /* CDVUserAgentUtil.h in Headers */,
 				7ED95D4A1AB9029B008C4574 /* CDVTimer.h in Headers */,
 				7ED95D3F1AB9029B008C4574 /* CDVConfigParser.h in Headers */,
+				7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */,
+				7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */,
+				7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */,
+				7ED95D051AB9028C008C4574 /* CDVPlugin+Private.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[13/50] [abbrv] ios commit: Added URL property to CDVWebViewEngineProtocol

Posted by ia...@apache.org.
Added URL property to CDVWebViewEngineProtocol


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/57773088
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/57773088
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/57773088

Branch: refs/heads/unplug-whitelist
Commit: 57773088ef6acd96ef796369c0811725b658206a
Parents: e9e3265
Author: Shazron Abdullah <sh...@gmail.com>
Authored: Fri Mar 13 18:49:05 2015 -0700
Committer: Shazron Abdullah <sh...@gmail.com>
Committed: Fri Mar 13 18:49:05 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVUIWebViewEngine.m       | 5 +++++
 CordovaLib/Classes/CDVWebViewEngineProtocol.h | 2 ++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/57773088/CordovaLib/Classes/CDVUIWebViewEngine.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVUIWebViewEngine.m b/CordovaLib/Classes/CDVUIWebViewEngine.m
index c222e15..3e01b08 100644
--- a/CordovaLib/Classes/CDVUIWebViewEngine.m
+++ b/CordovaLib/Classes/CDVUIWebViewEngine.m
@@ -80,6 +80,11 @@
     return nil;
 }
 
+- (NSURL*)URL
+{
+    return [[(UIWebView*)_engineWebView request] URL];
+}
+
 - (void)updateSettings:(NSDictionary*)settings
 {
     UIWebView* uiWebView = (UIWebView*)_engineWebView;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/57773088/CordovaLib/Classes/CDVWebViewEngineProtocol.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWebViewEngineProtocol.h b/CordovaLib/Classes/CDVWebViewEngineProtocol.h
index a36a7f4..18c1831 100644
--- a/CordovaLib/Classes/CDVWebViewEngineProtocol.h
+++ b/CordovaLib/Classes/CDVWebViewEngineProtocol.h
@@ -33,6 +33,8 @@
 - (id)loadHTMLString:(NSString*)string baseURL:(NSURL*)baseURL;
 - (void)evaluateJavaScript:(NSString*)javaScriptString completionHandler:(void (^)(id, NSError*))completionHandler;
 
+- (NSURL*)URL;
+
 - (instancetype)initWithFrame:(CGRect)frame;
 - (void)updateWithInfo:(NSDictionary*)info;
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[09/50] [abbrv] ios commit: Update version to 4.0.0-dev

Posted by ia...@apache.org.
Update version to 4.0.0-dev


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/9f49f5d3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/9f49f5d3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/9f49f5d3

Branch: refs/heads/unplug-whitelist
Commit: 9f49f5d3657b46b88ed120d046503d7bf846dd47
Parents: 2a64bbf
Author: Shazron Abdullah <sh...@apache.org>
Authored: Fri Mar 13 13:06:15 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri Mar 13 13:06:15 2015 -0700

----------------------------------------------------------------------
 CordovaLib/cordova.js                 | 2 +-
 bin/templates/scripts/cordova/version | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/9f49f5d3/CordovaLib/cordova.js
----------------------------------------------------------------------
diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js
index 47dae96..35dbc89 100644
--- a/CordovaLib/cordova.js
+++ b/CordovaLib/cordova.js
@@ -19,7 +19,7 @@
  under the License.
 */
 ;(function() {
-var PLATFORM_VERSION_BUILD_LABEL = '3.9.0-dev';
+var PLATFORM_VERSION_BUILD_LABEL = '4.0.0-dev';
 // file: src/scripts/require.js
 
 /*jshint -W079 */

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/9f49f5d3/bin/templates/scripts/cordova/version
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/version b/bin/templates/scripts/cordova/version
index b10a59c..736fbc4 100755
--- a/bin/templates/scripts/cordova/version
+++ b/bin/templates/scripts/cordova/version
@@ -25,6 +25,6 @@
     Note: it does not work if the --shared option was used to create the project.
 */
 
-var VERSION="3.9.0-dev"
+var VERSION="4.0.0-dev"
 
 console.log(VERSION);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[43/50] [abbrv] ios commit: Seperate config.xml parsing logic

Posted by ia...@apache.org.
Seperate config.xml parsing logic

Separates the logic of finding config.xml and feeding its contents to a parser from the task of choosing that parser and using its results


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/9ad1c7c9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/9ad1c7c9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/9ad1c7c9

Branch: refs/heads/unplug-whitelist
Commit: 9ad1c7c94179cdeb0d0cf9f0b44bff2b4f07570b
Parents: 2e5510e
Author: Ian Clelland <ic...@chromium.org>
Authored: Thu Oct 23 16:02:59 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Mar 19 10:56:26 2015 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDVViewController.h |  2 ++
 CordovaLib/Classes/Public/CDVViewController.m | 10 +++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/9ad1c7c9/CordovaLib/Classes/Public/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.h b/CordovaLib/Classes/Public/CDVViewController.h
index e3ead2f..534c649 100644
--- a/CordovaLib/Classes/Public/CDVViewController.h
+++ b/CordovaLib/Classes/Public/CDVViewController.h
@@ -84,4 +84,6 @@
 
 - (BOOL)URLisAllowed:(NSURL*)url;
 
+- (void)parseSettingsWithParser:(NSObject<NSXMLParserDelegate> *)delegate;
+
 @end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/9ad1c7c9/CordovaLib/Classes/Public/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index bf7e532..a6b7fae 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -163,10 +163,8 @@
     return [self.whitelist URLIsAllowed:url];
 }
 
-- (void)loadSettings
+- (void)parseSettingsWithParser:(NSObject<NSXMLParserDelegate> *)delegate
 {
-    CDVConfigParser* delegate = [[CDVConfigParser alloc] init];
-
     // read from config.xml in the app bundle
     NSString* path = [[NSBundle mainBundle] pathForResource:@"config" ofType:@"xml"];
 
@@ -184,6 +182,12 @@
     }
     [self.configParser setDelegate:((id < NSXMLParserDelegate >)delegate)];
     [self.configParser parse];
+}
+
+- (void)loadSettings
+{
+    CDVConfigParser* delegate = [[CDVConfigParser alloc] init];
+    [self parseSettingsWithParser:delegate];
 
     // Get the plugin dictionary, whitelist and settings from the delegate.
     self.pluginsMap = delegate.pluginsDict;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[32/50] [abbrv] ios commit: CB-8690 - Group files into folders in CordovaLib/Classes

Posted by ia...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
deleted file mode 100644
index 6b40a84..0000000
--- a/CordovaLib/Classes/CDVViewController.m
+++ /dev/null
@@ -1,878 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <objc/message.h>
-#import "CDV.h"
-#import "CDVPlugin+Private.h"
-#import "CDVUIWebViewDelegate.h"
-#import "CDVConfigParser.h"
-#import "CDVUserAgentUtil.h"
-#import <AVFoundation/AVFoundation.h>
-#import "NSDictionary+CordovaPreferences.h"
-#import "CDVHandleOpenURL.h"
-#import "CDVCommandDelegateImpl.h"
-
-#define degreesToRadian(x) (M_PI * (x) / 180.0)
-
-@interface CDVViewController () {
-    NSInteger _userAgentLockToken;
-}
-
-@property (nonatomic, readwrite, strong) NSXMLParser* configParser;
-@property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
-@property (nonatomic, readwrite, strong) CDVWhitelist* whitelist;
-@property (nonatomic, readwrite, strong) NSMutableDictionary* pluginObjects;
-@property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
-@property (nonatomic, readwrite, strong) NSDictionary* pluginsMap;
-@property (nonatomic, readwrite, strong) NSArray* supportedOrientations;
-@property (nonatomic, readwrite, assign) BOOL loadFromString;
-@property (nonatomic, readwrite, strong) id <CDVWebViewEngineProtocol> webViewEngine;
-
-@property (readwrite, assign) BOOL initialized;
-
-@property (atomic, strong) NSURL* openURL;
-
-@end
-
-@implementation CDVViewController
-
-@synthesize supportedOrientations;
-@synthesize pluginObjects, pluginsMap, whitelist, startupPluginNames;
-@synthesize configParser, settings, loadFromString;
-@synthesize wwwFolderName, startPage, initialized, openURL, baseUserAgent;
-@synthesize commandDelegate = _commandDelegate;
-@synthesize commandQueue = _commandQueue;
-@synthesize webViewEngine = _webViewEngine;
-@dynamic webView;
-
-- (void)__init
-{
-    if ((self != nil) && !self.initialized) {
-        _commandQueue = [[CDVCommandQueue alloc] initWithViewController:self];
-        _commandDelegate = [[CDVCommandDelegateImpl alloc] initWithViewController:self];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillTerminate:)
-                                                     name:UIApplicationWillTerminateNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillResignActive:)
-                                                     name:UIApplicationWillResignActiveNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidBecomeActive:)
-                                                     name:UIApplicationDidBecomeActiveNotification object:nil];
-
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillEnterForeground:)
-                                                     name:UIApplicationWillEnterForegroundNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidEnterBackground:)
-                                                     name:UIApplicationDidEnterBackgroundNotification object:nil];
-
-        // read from UISupportedInterfaceOrientations (or UISupportedInterfaceOrientations~iPad, if its iPad) from -Info.plist
-        self.supportedOrientations = [self parseInterfaceOrientations:
-            [[[NSBundle mainBundle] infoDictionary] objectForKey:@"UISupportedInterfaceOrientations"]];
-
-        [self printVersion];
-        [self printMultitaskingInfo];
-        [self printPlatformVersionWarning];
-        self.initialized = YES;
-
-        // load config.xml settings
-        [self loadSettings];
-    }
-}
-
-- (id)initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil
-{
-    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
-    [self __init];
-    return self;
-}
-
-- (id)initWithCoder:(NSCoder*)aDecoder
-{
-    self = [super initWithCoder:aDecoder];
-    [self __init];
-    return self;
-}
-
-- (id)init
-{
-    self = [super init];
-    [self __init];
-    return self;
-}
-
-- (void)viewWillAppear:(BOOL)animated
-{
-    [super viewWillAppear:animated];
-}
-
-- (void)viewWillDisappear:(BOOL)animated
-{
-    [super viewWillDisappear:animated];
-}
-
-- (void)printVersion
-{
-    NSLog(@"Apache Cordova native platform version %@ is starting.", CDV_VERSION);
-}
-
-- (void)printPlatformVersionWarning
-{
-    if (!IsAtLeastiOSVersion(@"7.0")) {
-        NSLog(@"CRITICAL: For Cordova 4.0.0 and above, you will need to upgrade to at least iOS 7.0 or greater. Your current version of iOS is %@.",
-            [[UIDevice currentDevice] systemVersion]
-            );
-    }
-}
-
-- (void)printMultitaskingInfo
-{
-    UIDevice* device = [UIDevice currentDevice];
-    BOOL backgroundSupported = NO;
-
-    if ([device respondsToSelector:@selector(isMultitaskingSupported)]) {
-        backgroundSupported = device.multitaskingSupported;
-    }
-
-    NSNumber* exitsOnSuspend = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIApplicationExitsOnSuspend"];
-    if (exitsOnSuspend == nil) { // if it's missing, it should be NO (i.e. multi-tasking on by default)
-        exitsOnSuspend = [NSNumber numberWithBool:NO];
-    }
-
-    NSLog(@"Multi-tasking -> Device: %@, App: %@", (backgroundSupported ? @"YES" : @"NO"), (![exitsOnSuspend intValue]) ? @"YES" : @"NO");
-}
-
-- (BOOL)URLisAllowed:(NSURL*)url
-{
-    if (self.whitelist == nil) {
-        return YES;
-    }
-
-    return [self.whitelist URLIsAllowed:url];
-}
-
-- (void)loadSettings
-{
-    CDVConfigParser* delegate = [[CDVConfigParser alloc] init];
-
-    // read from config.xml in the app bundle
-    NSString* path = [[NSBundle mainBundle] pathForResource:@"config" ofType:@"xml"];
-
-    if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
-        NSAssert(NO, @"ERROR: config.xml does not exist. Please run cordova-ios/bin/cordova_plist_to_config_xml path/to/project.");
-        return;
-    }
-
-    NSURL* url = [NSURL fileURLWithPath:path];
-
-    self.configParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
-    if (self.configParser == nil) {
-        NSLog(@"Failed to initialize XML parser.");
-        return;
-    }
-    [self.configParser setDelegate:((id < NSXMLParserDelegate >)delegate)];
-    [self.configParser parse];
-
-    // Get the plugin dictionary, whitelist and settings from the delegate.
-    self.pluginsMap = delegate.pluginsDict;
-    self.startupPluginNames = delegate.startupPluginNames;
-    self.whitelist = [[CDVWhitelist alloc] initWithArray:delegate.whitelistHosts];
-    self.settings = delegate.settings;
-
-    // And the start folder/page.
-    self.wwwFolderName = @"www";
-    self.startPage = delegate.startPage;
-    if (self.startPage == nil) {
-        self.startPage = @"index.html";
-    }
-
-    // Initialize the plugin objects dict.
-    self.pluginObjects = [[NSMutableDictionary alloc] initWithCapacity:20];
-}
-
-- (NSURL*)appUrl
-{
-    NSURL* appURL = nil;
-
-    if ([self.startPage rangeOfString:@"://"].location != NSNotFound) {
-        appURL = [NSURL URLWithString:self.startPage];
-    } else if ([self.wwwFolderName rangeOfString:@"://"].location != NSNotFound) {
-        appURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", self.wwwFolderName, self.startPage]];
-    } else {
-        // CB-3005 strip parameters from start page to check if page exists in resources
-        NSURL* startURL = [NSURL URLWithString:self.startPage];
-        NSString* startFilePath = [self.commandDelegate pathForResource:[startURL path]];
-
-        if (startFilePath == nil) {
-            self.loadFromString = YES;
-            appURL = nil;
-        } else {
-            appURL = [NSURL fileURLWithPath:startFilePath];
-            // CB-3005 Add on the query params or fragment.
-            NSString* startPageNoParentDirs = self.startPage;
-            NSRange r = [startPageNoParentDirs rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"?#"] options:0];
-            if (r.location != NSNotFound) {
-                NSString* queryAndOrFragment = [self.startPage substringFromIndex:r.location];
-                appURL = [NSURL URLWithString:queryAndOrFragment relativeToURL:appURL];
-            }
-        }
-    }
-
-    return appURL;
-}
-
-- (NSURL*)errorUrl
-{
-    NSURL* errorURL = nil;
-
-    id setting = [self.settings cordovaSettingForKey:@"ErrorUrl"];
-
-    if (setting) {
-        NSString* errorUrlString = (NSString*)setting;
-        if ([errorUrlString rangeOfString:@"://"].location != NSNotFound) {
-            errorURL = [NSURL URLWithString:errorUrlString];
-        } else {
-            NSURL* url = [NSURL URLWithString:(NSString*)setting];
-            NSString* errorFilePath = [self.commandDelegate pathForResource:[url path]];
-            if (errorFilePath) {
-                errorURL = [NSURL fileURLWithPath:errorFilePath];
-            }
-        }
-    }
-
-    return errorURL;
-}
-
-- (UIView*)webView
-{
-    if (self.webViewEngine != nil) {
-        return self.webViewEngine.engineWebView;
-    }
-
-    return nil;
-}
-
-// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-- (void)viewDidLoad
-{
-    [super viewDidLoad];
-
-    // // Fix the iOS 5.1 SECURITY_ERR bug (CB-347), this must be before the webView is instantiated ////
-
-    NSString* backupWebStorageType = @"cloud"; // default value
-
-    id backupWebStorage = [self.settings cordovaSettingForKey:@"BackupWebStorage"];
-    if ([backupWebStorage isKindOfClass:[NSString class]]) {
-        backupWebStorageType = backupWebStorage;
-    }
-    [self.settings setCordovaSetting:backupWebStorageType forKey:@"BackupWebStorage"];
-
-    [CDVLocalStorage __fixupDatabaseLocationsWithBackupType:backupWebStorageType];
-
-    // // Instantiate the WebView ///////////////
-
-    if (!self.webView) {
-        [self createGapView];
-    }
-
-    // register this viewcontroller with the NSURLProtocol, only after the User-Agent is set
-    [CDVURLProtocol registerViewController:self];
-
-    // /////////////////
-
-    /*
-     * Fire up CDVLocalStorage to work-around WebKit storage limitations: on all iOS 5.1+ versions for local-only backups, but only needed on iOS 5.1 for cloud backup.
-        With minimum iOS 6/7 supported, only first clause applies.
-     */
-    if ([backupWebStorageType isEqualToString:@"local"]) {
-        NSString* localStorageFeatureName = @"localstorage";
-        if ([self.pluginsMap objectForKey:localStorageFeatureName]) { // plugin specified in config
-            [self.startupPluginNames addObject:localStorageFeatureName];
-        }
-    }
-
-    if ([self.startupPluginNames count] > 0) {
-        [CDVTimer start:@"TotalPluginStartup"];
-
-        for (NSString* pluginName in self.startupPluginNames) {
-            [CDVTimer start:pluginName];
-            [self getCommandInstance:pluginName];
-            [CDVTimer stop:pluginName];
-        }
-
-        [CDVTimer stop:@"TotalPluginStartup"];
-    }
-
-    // /////////////////
-    NSURL* appURL = [self appUrl];
-
-    [CDVUserAgentUtil acquireLock:^(NSInteger lockToken) {
-        _userAgentLockToken = lockToken;
-        [CDVUserAgentUtil setUserAgent:self.userAgent lockToken:lockToken];
-        if (appURL) {
-            NSURLRequest* appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
-            [self.webViewEngine loadRequest:appReq];
-        } else {
-            NSString* loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.wwwFolderName, self.startPage];
-            NSLog(@"%@", loadErr);
-
-            NSURL* errorUrl = [self errorUrl];
-            if (errorUrl) {
-                errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [loadErr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] relativeToURL:errorUrl];
-                NSLog(@"%@", [errorUrl absoluteString]);
-                [self.webViewEngine loadRequest:[NSURLRequest requestWithURL:errorUrl]];
-            } else {
-                NSString* html = [NSString stringWithFormat:@"<html><body> %@ </body></html>", loadErr];
-                [self.webViewEngine loadHTMLString:html baseURL:nil];
-            }
-        }
-    }];
-}
-
-- (NSArray*)parseInterfaceOrientations:(NSArray*)orientations
-{
-    NSMutableArray* result = [[NSMutableArray alloc] init];
-
-    if (orientations != nil) {
-        NSEnumerator* enumerator = [orientations objectEnumerator];
-        NSString* orientationString;
-
-        while (orientationString = [enumerator nextObject]) {
-            if ([orientationString isEqualToString:@"UIInterfaceOrientationPortrait"]) {
-                [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortrait]];
-            } else if ([orientationString isEqualToString:@"UIInterfaceOrientationPortraitUpsideDown"]) {
-                [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortraitUpsideDown]];
-            } else if ([orientationString isEqualToString:@"UIInterfaceOrientationLandscapeLeft"]) {
-                [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft]];
-            } else if ([orientationString isEqualToString:@"UIInterfaceOrientationLandscapeRight"]) {
-                [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight]];
-            }
-        }
-    }
-
-    // default
-    if ([result count] == 0) {
-        [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortrait]];
-    }
-
-    return result;
-}
-
-- (NSInteger)mapIosOrientationToJsOrientation:(UIInterfaceOrientation)orientation
-{
-    switch (orientation) {
-        case UIInterfaceOrientationPortraitUpsideDown:
-            return 180;
-
-        case UIInterfaceOrientationLandscapeLeft:
-            return -90;
-
-        case UIInterfaceOrientationLandscapeRight:
-            return 90;
-
-        case UIInterfaceOrientationPortrait:
-            return 0;
-
-        default:
-            return 0;
-    }
-}
-
-- (void)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation completionHandler:(void (^)(BOOL))completionHandler
-{
-    // First, ask the webview via JS if it supports the new orientation
-    NSString* jsCall = [NSString stringWithFormat:
-        @"window.shouldRotateToOrientation && window.shouldRotateToOrientation(%ld);"
-        , (long)[self mapIosOrientationToJsOrientation:interfaceOrientation]];
-    __weak CDVViewController* weakSelf = self;
-
-    [_webViewEngine evaluateJavaScript:jsCall completionHandler:^(NSString* obj, NSError* error) {
-        if ([obj length] > 0) {
-            completionHandler([obj boolValue]);
-        } else {
-            // if js did not handle the new orientation (no return value), use values from the plist (via supportedOrientations)
-            completionHandler([weakSelf supportsOrientation:interfaceOrientation]);
-        }
-    }];
-}
-
-- (BOOL)shouldAutorotate
-{
-    return YES;
-}
-
-- (NSUInteger)supportedInterfaceOrientations
-{
-    NSUInteger ret = 0;
-
-    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationPortrait]) {
-        ret = ret | (1 << UIInterfaceOrientationPortrait);
-    }
-    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown]) {
-        ret = ret | (1 << UIInterfaceOrientationPortraitUpsideDown);
-    }
-    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight]) {
-        ret = ret | (1 << UIInterfaceOrientationLandscapeRight);
-    }
-    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeLeft]) {
-        ret = ret | (1 << UIInterfaceOrientationLandscapeLeft);
-    }
-
-    return ret;
-}
-
-- (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation
-{
-    return [self.supportedOrientations containsObject:[NSNumber numberWithInt:orientation]];
-}
-
-- (UIView*)newCordovaViewWithFrame:(CGRect)bounds
-{
-    NSString* defaultWebViewEngineClass = @"CDVUIWebViewEngine";
-    NSString* webViewEngineClass = [self.settings cordovaSettingForKey:@"CordovaWebViewEngine"];
-
-    if (!webViewEngineClass) {
-        webViewEngineClass = defaultWebViewEngineClass;
-    }
-
-    // Find webViewEngine
-    if (NSClassFromString(webViewEngineClass)) {
-        self.webViewEngine = [[NSClassFromString(webViewEngineClass) alloc] initWithFrame:bounds];
-        // if a webView engine returns nil (not supported by the current iOS version) or doesn't conform to the protocol, we use UIWebView
-        if (!self.webViewEngine || ![self.webViewEngine conformsToProtocol:@protocol(CDVWebViewEngineProtocol)]) {
-            self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) alloc] initWithFrame:bounds];
-        }
-    } else {
-        self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) alloc] initWithFrame:bounds];
-    }
-
-    if ([self.webViewEngine isKindOfClass:[CDVPlugin class]]) {
-        [self registerPlugin:(CDVPlugin*)self.webViewEngine withClassName:webViewEngineClass];
-    }
-
-    return self.webViewEngine.engineWebView;
-}
-
-- (NSString*)userAgent
-{
-    if (_userAgent == nil) {
-        NSString* localBaseUserAgent;
-        if (self.baseUserAgent != nil) {
-            localBaseUserAgent = self.baseUserAgent;
-        } else {
-            localBaseUserAgent = [CDVUserAgentUtil originalUserAgent];
-        }
-        // Use our address as a unique number to append to the User-Agent.
-        _userAgent = [NSString stringWithFormat:@"%@ (%lld)", localBaseUserAgent, (long long)self];
-    }
-    return _userAgent;
-}
-
-- (void)createGapView
-{
-    CGRect webViewBounds = self.view.bounds;
-
-    webViewBounds.origin = self.view.bounds.origin;
-
-    UIView* view = [self newCordovaViewWithFrame:webViewBounds];
-
-    view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
-    [self.view addSubview:view];
-    [self.view sendSubviewToBack:view];
-}
-
-- (void)didReceiveMemoryWarning
-{
-    // iterate through all the plugin objects, and call hasPendingOperation
-    // if at least one has a pending operation, we don't call [super didReceiveMemoryWarning]
-
-    NSEnumerator* enumerator = [self.pluginObjects objectEnumerator];
-    CDVPlugin* plugin;
-
-    BOOL doPurge = YES;
-
-    while ((plugin = [enumerator nextObject])) {
-        if (plugin.hasPendingOperation) {
-            NSLog(@"Plugin '%@' has a pending operation, memory purge is delayed for didReceiveMemoryWarning.", NSStringFromClass([plugin class]));
-            doPurge = NO;
-        }
-    }
-
-    if (doPurge) {
-        // Releases the view if it doesn't have a superview.
-        [super didReceiveMemoryWarning];
-    }
-
-    // Release any cached data, images, etc. that aren't in use.
-}
-
-- (void)viewDidUnload
-{
-    // Release any retained subviews of the main view.
-    // e.g. self.myOutlet = nil;
-
-    [CDVUserAgentUtil releaseLock:&_userAgentLockToken];
-
-    [super viewDidUnload];
-}
-
-#pragma mark UIWebViewDelegate
-
-/**
- When web application loads Add stuff to the DOM, mainly the user-defined settings from the Settings.plist file, and
- the device's data such as device ID, platform version, etc.
- */
-- (void)webViewDidStartLoad:(UIWebView*)theWebView
-{
-    NSLog(@"Resetting plugins due to page load.");
-    [_commandQueue resetRequestId];
-    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginResetNotification object:self.webView]];
-}
-
-/**
- Called when the webview finishes loading.  This stops the activity view.
- */
-- (void)webViewDidFinishLoad:(UIWebView*)theWebView
-{
-    NSLog(@"Finished load of: %@", theWebView.request.URL);
-    // It's safe to release the lock even if this is just a sub-frame that's finished loading.
-    [CDVUserAgentUtil releaseLock:&_userAgentLockToken];
-
-    /*
-     * Hide the Top Activity THROBBER in the Battery Bar
-     */
-    [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
-
-    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:self.webView]];
-}
-
-- (void)webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error
-{
-    [CDVUserAgentUtil releaseLock:&_userAgentLockToken];
-
-    NSString* message = [NSString stringWithFormat:@"Failed to load webpage with error: %@", [error localizedDescription]];
-    NSLog(@"%@", message);
-
-    NSURL* errorUrl = [self errorUrl];
-    if (errorUrl) {
-        errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [message stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] relativeToURL:errorUrl];
-        NSLog(@"%@", [errorUrl absoluteString]);
-        [theWebView loadRequest:[NSURLRequest requestWithURL:errorUrl]];
-    }
-}
-
-- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
-{
-    NSURL* url = [request URL];
-
-    /*
-     * Execute any commands queued with cordova.exec() on the JS side.
-     * The part of the URL after gap:// is irrelevant.
-     */
-    if ([[url scheme] isEqualToString:@"gap"]) {
-        [_commandQueue fetchCommandsFromJs];
-        // The delegate is called asynchronously in this case, so we don't have to use
-        // flushCommandQueueWithDelayedJs (setTimeout(0)) as we do with hash changes.
-        [_commandQueue executePending];
-        return NO;
-    }
-
-    if ([[url fragment] hasPrefix:@"%01"] || [[url fragment] hasPrefix:@"%02"]) {
-        // Delegate is called *immediately* for hash changes. This means that any
-        // calls to stringByEvaluatingJavascriptFromString will occur in the middle
-        // of an existing (paused) call stack. This doesn't cause errors, but may
-        // be unexpected to callers (exec callbacks will be called before exec() even
-        // returns). To avoid this, we do not do any synchronous JS evals by using
-        // flushCommandQueueWithDelayedJs.
-        NSString* inlineCommands = [[url fragment] substringFromIndex:3];
-        if ([inlineCommands length] == 0) {
-            // Reach in right away since the WebCore / Main thread are already synchronized.
-            [_commandQueue fetchCommandsFromJs];
-        } else {
-            inlineCommands = [inlineCommands stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-            [_commandQueue enqueueCommandBatch:inlineCommands];
-        }
-        // Switch these for minor performance improvements, and to really live on the wild side.
-        // Callbacks will occur in the middle of the location.hash = ... statement!
-        [(CDVCommandDelegateImpl*)_commandDelegate flushCommandQueueWithDelayedJs];
-        // [_commandQueue executePending];
-
-        // Although we return NO, the hash change does end up taking effect.
-        return NO;
-    }
-
-    /*
-     * Give plugins the chance to handle the url
-     */
-    for (NSString* pluginName in pluginObjects) {
-        CDVPlugin* plugin = [pluginObjects objectForKey:pluginName];
-        SEL selector = NSSelectorFromString(@"shouldOverrideLoadWithRequest:navigationType:");
-        if ([plugin respondsToSelector:selector]) {
-            if (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, request, navigationType) == YES) {
-                return NO;
-            }
-        }
-    }
-
-    /*
-     * If a URL is being loaded that's a file/http/https URL, just load it internally
-     */
-    if ([url isFileURL]) {
-        return YES;
-    }
-
-    /*
-     *    If we loaded the HTML from a string, we let the app handle it
-     */
-    else if (self.loadFromString == YES) {
-        self.loadFromString = NO;
-        return YES;
-    }
-
-    /*
-     * all tel: scheme urls we let the UIWebview handle it using the default behavior
-     */
-    else if ([[url scheme] isEqualToString:@"tel"]) {
-        return YES;
-    }
-
-    /*
-     * all about: scheme urls are not handled
-     */
-    else if ([[url scheme] isEqualToString:@"about"]) {
-        return NO;
-    }
-
-    /*
-     * all data: scheme urls are handled
-     */
-    else if ([[url scheme] isEqualToString:@"data"]) {
-        return YES;
-    }
-
-    /*
-     * Handle all other types of urls (tel:, sms:), and requests to load a url in the main webview.
-     */
-    else {
-        if ([self.whitelist schemeIsAllowed:[url scheme]]) {
-            return [self.whitelist URLIsAllowed:url];
-        } else {
-            if ([[UIApplication sharedApplication] canOpenURL:url]) {
-                [[UIApplication sharedApplication] openURL:url];
-            } else { // handle any custom schemes to plugins
-                [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
-            }
-        }
-
-        return NO;
-    }
-
-    return YES;
-}
-
-#pragma mark GapHelpers
-
-- (void)javascriptAlert:(NSString*)text
-{
-    NSString* jsString = [NSString stringWithFormat:@"alert('%@');", text];
-
-    [self.commandDelegate evalJs:jsString];
-}
-
-+ (NSString*)applicationDocumentsDirectory
-{
-    NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
-    NSString* basePath = (([paths count] > 0) ? ([paths objectAtIndex:0]) : nil);
-
-    return basePath;
-}
-
-#pragma mark CordovaCommands
-
-- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className
-{
-    if ([plugin respondsToSelector:@selector(setViewController:)]) {
-        [plugin setViewController:self];
-    }
-
-    if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) {
-        [plugin setCommandDelegate:_commandDelegate];
-    }
-
-    [self.pluginObjects setObject:plugin forKey:className];
-    [plugin pluginInitialize];
-}
-
-- (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName
-{
-    if ([plugin respondsToSelector:@selector(setViewController:)]) {
-        [plugin setViewController:self];
-    }
-
-    if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) {
-        [plugin setCommandDelegate:_commandDelegate];
-    }
-
-    NSString* className = NSStringFromClass([plugin class]);
-    [self.pluginObjects setObject:plugin forKey:className];
-    [self.pluginsMap setValue:className forKey:[pluginName lowercaseString]];
-    [plugin pluginInitialize];
-}
-
-/**
- Returns an instance of a CordovaCommand object, based on its name.  If one exists already, it is returned.
- */
-- (id)getCommandInstance:(NSString*)pluginName
-{
-    // first, we try to find the pluginName in the pluginsMap
-    // (acts as a whitelist as well) if it does not exist, we return nil
-    // NOTE: plugin names are matched as lowercase to avoid problems - however, a
-    // possible issue is there can be duplicates possible if you had:
-    // "org.apache.cordova.Foo" and "org.apache.cordova.foo" - only the lower-cased entry will match
-    NSString* className = [self.pluginsMap objectForKey:[pluginName lowercaseString]];
-
-    if (className == nil) {
-        return nil;
-    }
-
-    id obj = [self.pluginObjects objectForKey:className];
-    if (!obj) {
-        obj = [[NSClassFromString(className)alloc] initWithWebViewEngine:_webViewEngine];
-
-        if (obj != nil) {
-            [self registerPlugin:obj withClassName:className];
-        } else {
-            NSLog(@"CDVPlugin class %@ (pluginName: %@) does not exist.", className, pluginName);
-        }
-    }
-    return obj;
-}
-
-#pragma mark -
-
-- (NSString*)appURLScheme
-{
-    NSString* URLScheme = nil;
-
-    NSArray* URLTypes = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleURLTypes"];
-
-    if (URLTypes != nil) {
-        NSDictionary* dict = [URLTypes objectAtIndex:0];
-        if (dict != nil) {
-            NSArray* URLSchemes = [dict objectForKey:@"CFBundleURLSchemes"];
-            if (URLSchemes != nil) {
-                URLScheme = [URLSchemes objectAtIndex:0];
-            }
-        }
-    }
-
-    return URLScheme;
-}
-
-/**
- Returns the contents of the named plist bundle, loaded as a dictionary object
- */
-+ (NSDictionary*)getBundlePlist:(NSString*)plistName
-{
-    NSString* errorDesc = nil;
-    NSPropertyListFormat format;
-    NSString* plistPath = [[NSBundle mainBundle] pathForResource:plistName ofType:@"plist"];
-    NSData* plistXML = [[NSFileManager defaultManager] contentsAtPath:plistPath];
-    NSDictionary* temp = (NSDictionary*)[NSPropertyListSerialization
-        propertyListFromData:plistXML
-            mutabilityOption:NSPropertyListMutableContainersAndLeaves
-                      format:&format errorDescription:&errorDesc];
-
-    return temp;
-}
-
-#pragma mark -
-#pragma mark UIApplicationDelegate impl
-
-/*
- This method lets your application know that it is about to be terminated and purged from memory entirely
- */
-- (void)onAppWillTerminate:(NSNotification*)notification
-{
-    // empty the tmp directory
-    NSFileManager* fileMgr = [[NSFileManager alloc] init];
-    NSError* __autoreleasing err = nil;
-
-    // clear contents of NSTemporaryDirectory
-    NSString* tempDirectoryPath = NSTemporaryDirectory();
-    NSDirectoryEnumerator* directoryEnumerator = [fileMgr enumeratorAtPath:tempDirectoryPath];
-    NSString* fileName = nil;
-    BOOL result;
-
-    while ((fileName = [directoryEnumerator nextObject])) {
-        NSString* filePath = [tempDirectoryPath stringByAppendingPathComponent:fileName];
-        result = [fileMgr removeItemAtPath:filePath error:&err];
-        if (!result && err) {
-            NSLog(@"Failed to delete: %@ (error: %@)", filePath, err);
-        }
-    }
-}
-
-/*
- This method is called to let your application know that it is about to move from the active to inactive state.
- You should use this method to pause ongoing tasks, disable timer, ...
- */
-- (void)onAppWillResignActive:(NSNotification*)notification
-{
-    // NSLog(@"%@",@"applicationWillResignActive");
-    [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('resign');" scheduledOnRunLoop:NO];
-}
-
-/*
- In iOS 4.0 and later, this method is called as part of the transition from the background to the inactive state.
- You can use this method to undo many of the changes you made to your application upon entering the background.
- invariably followed by applicationDidBecomeActive
- */
-- (void)onAppWillEnterForeground:(NSNotification*)notification
-{
-    // NSLog(@"%@",@"applicationWillEnterForeground");
-    [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('resume');"];
-}
-
-// This method is called to let your application know that it moved from the inactive to active state.
-- (void)onAppDidBecomeActive:(NSNotification*)notification
-{
-    // NSLog(@"%@",@"applicationDidBecomeActive");
-    [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('active');"];
-}
-
-/*
- In iOS 4.0 and later, this method is called instead of the applicationWillTerminate: method
- when the user quits an application that supports background execution.
- */
-- (void)onAppDidEnterBackground:(NSNotification*)notification
-{
-    // NSLog(@"%@",@"applicationDidEnterBackground");
-    [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('pause', null, true);" scheduledOnRunLoop:NO];
-}
-
-// ///////////////////////
-
-- (void)dealloc
-{
-    [CDVURLProtocol unregisterViewController:self];
-    [[NSNotificationCenter defaultCenter] removeObserver:self];
-
-    [CDVUserAgentUtil releaseLock:&_userAgentLockToken];
-    [_commandQueue dispose];
-    [[self.pluginObjects allValues] makeObjectsPerformSelector:@selector(dispose)];
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVWebViewEngineProtocol.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWebViewEngineProtocol.h b/CordovaLib/Classes/CDVWebViewEngineProtocol.h
deleted file mode 100644
index 18c1831..0000000
--- a/CordovaLib/Classes/CDVWebViewEngineProtocol.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <UIKit/UIKit.h>
-
-#define kCDVWebViewEngineScriptMessageHandlers @"kCDVWebViewEngineScriptMessageHandlers"
-#define kCDVWebViewEngineUIWebViewDelegate @"kCDVWebViewEngineUIWebViewDelegate"
-#define kCDVWebViewEngineWKNavigationDelegate @"kCDVWebViewEngineWKNavigationDelegate"
-#define kCDVWebViewEngineWKUIDelegate @"kCDVWebViewEngineWKUIDelegate"
-#define kCDVWebViewEngineWebViewPreferences @"kCDVWebViewEngineWebViewPreferences"
-
-@protocol CDVWebViewEngineProtocol <NSObject>
-
-@property (nonatomic, strong, readonly) UIView* engineWebView;
-
-- (id)loadRequest:(NSURLRequest*)request;
-- (id)loadHTMLString:(NSString*)string baseURL:(NSURL*)baseURL;
-- (void)evaluateJavaScript:(NSString*)javaScriptString completionHandler:(void (^)(id, NSError*))completionHandler;
-
-- (NSURL*)URL;
-
-- (instancetype)initWithFrame:(CGRect)frame;
-- (void)updateWithInfo:(NSDictionary*)info;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVWhitelist.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWhitelist.h b/CordovaLib/Classes/CDVWhitelist.h
deleted file mode 100644
index 9165097..0000000
--- a/CordovaLib/Classes/CDVWhitelist.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-extern NSString* const kCDVDefaultWhitelistRejectionString;
-
-@interface CDVWhitelist : NSObject
-
-@property (nonatomic, copy) NSString* whitelistRejectionFormatString;
-
-- (id)initWithArray:(NSArray*)array;
-- (BOOL)schemeIsAllowed:(NSString*)scheme;
-- (BOOL)URLIsAllowed:(NSURL*)url;
-- (BOOL)URLIsAllowed:(NSURL*)url logFailure:(BOOL)logFailure;
-- (NSString*)errorStringForURL:(NSURL*)url;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVWhitelist.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWhitelist.m b/CordovaLib/Classes/CDVWhitelist.m
deleted file mode 100644
index 8e3be75..0000000
--- a/CordovaLib/Classes/CDVWhitelist.m
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVWhitelist.h"
-
-NSString* const kCDVDefaultWhitelistRejectionString = @"ERROR whitelist rejection: url='%@'";
-NSString* const kCDVDefaultSchemeName = @"cdv-default-scheme";
-
-@interface CDVWhitelistPattern : NSObject {
-    @private
-    NSRegularExpression* _scheme;
-    NSRegularExpression* _host;
-    NSNumber* _port;
-    NSRegularExpression* _path;
-}
-
-+ (NSString*)regexFromPattern:(NSString*)pattern allowWildcards:(bool)allowWildcards;
-- (id)initWithScheme:(NSString*)scheme host:(NSString*)host port:(NSString*)port path:(NSString*)path;
-- (bool)matches:(NSURL*)url;
-
-@end
-
-@implementation CDVWhitelistPattern
-
-+ (NSString*)regexFromPattern:(NSString*)pattern allowWildcards:(bool)allowWildcards
-{
-    NSString* regex = [NSRegularExpression escapedPatternForString:pattern];
-
-    if (allowWildcards) {
-        regex = [regex stringByReplacingOccurrencesOfString:@"\\*" withString:@".*"];
-
-        /* [NSURL path] has the peculiarity that a trailing slash at the end of a path
-         * will be omitted. This regex tweak compensates for that.
-         */
-        if ([regex hasSuffix:@"\\/.*"]) {
-            regex = [NSString stringWithFormat:@"%@(\\/.*)?", [regex substringToIndex:([regex length] - 4)]];
-        }
-    }
-    return [NSString stringWithFormat:@"%@$", regex];
-}
-
-- (id)initWithScheme:(NSString*)scheme host:(NSString*)host port:(NSString*)port path:(NSString*)path
-{
-    self = [super init];  // Potentially change "self"
-    if (self) {
-        if ((scheme == nil) || [scheme isEqualToString:@"*"]) {
-            _scheme = nil;
-        } else {
-            _scheme = [NSRegularExpression regularExpressionWithPattern:[CDVWhitelistPattern regexFromPattern:scheme allowWildcards:NO] options:NSRegularExpressionCaseInsensitive error:nil];
-        }
-        if ([host isEqualToString:@"*"]) {
-            _host = nil;
-        } else if ([host hasPrefix:@"*."]) {
-            _host = [NSRegularExpression regularExpressionWithPattern:[NSString stringWithFormat:@"([a-z0-9.-]*\\.)?%@", [CDVWhitelistPattern regexFromPattern:[host substringFromIndex:2] allowWildcards:false]] options:NSRegularExpressionCaseInsensitive error:nil];
-        } else {
-            _host = [NSRegularExpression regularExpressionWithPattern:[CDVWhitelistPattern regexFromPattern:host allowWildcards:NO] options:NSRegularExpressionCaseInsensitive error:nil];
-        }
-        if ((port == nil) || [port isEqualToString:@"*"]) {
-            _port = nil;
-        } else {
-            _port = [[NSNumber alloc] initWithInteger:[port integerValue]];
-        }
-        if ((path == nil) || [path isEqualToString:@"/*"]) {
-            _path = nil;
-        } else {
-            _path = [NSRegularExpression regularExpressionWithPattern:[CDVWhitelistPattern regexFromPattern:path allowWildcards:YES] options:0 error:nil];
-        }
-    }
-    return self;
-}
-
-- (bool)matches:(NSURL*)url
-{
-    return (_scheme == nil || [_scheme numberOfMatchesInString:[url scheme] options:NSMatchingAnchored range:NSMakeRange(0, [[url scheme] length])]) &&
-           (_host == nil || [_host numberOfMatchesInString:[url host] options:NSMatchingAnchored range:NSMakeRange(0, [[url host] length])]) &&
-           (_port == nil || [[url port] isEqualToNumber:_port]) &&
-           (_path == nil || [_path numberOfMatchesInString:[url path] options:NSMatchingAnchored range:NSMakeRange(0, [[url path] length])])
-    ;
-}
-
-@end
-
-@interface CDVWhitelist ()
-
-@property (nonatomic, readwrite, strong) NSMutableArray* whitelist;
-@property (nonatomic, readwrite, strong) NSMutableSet* permittedSchemes;
-
-- (void)addWhiteListEntry:(NSString*)pattern;
-
-@end
-
-@implementation CDVWhitelist
-
-@synthesize whitelist, permittedSchemes, whitelistRejectionFormatString;
-
-- (id)initWithArray:(NSArray*)array
-{
-    self = [super init];
-    if (self) {
-        self.whitelist = [[NSMutableArray alloc] init];
-        self.permittedSchemes = [[NSMutableSet alloc] init];
-        self.whitelistRejectionFormatString = kCDVDefaultWhitelistRejectionString;
-
-        for (NSString* pattern in array) {
-            [self addWhiteListEntry:pattern];
-        }
-    }
-    return self;
-}
-
-- (BOOL)isIPv4Address:(NSString*)externalHost
-{
-    // an IPv4 address has 4 octets b.b.b.b where b is a number between 0 and 255.
-    // for our purposes, b can also be the wildcard character '*'
-
-    // we could use a regex to solve this problem but then I would have two problems
-    // anyways, this is much clearer and maintainable
-    NSArray* octets = [externalHost componentsSeparatedByString:@"."];
-    NSUInteger num_octets = [octets count];
-
-    // quick check
-    if (num_octets != 4) {
-        return NO;
-    }
-
-    // restrict number parsing to 0-255
-    NSNumberFormatter* numberFormatter = [[NSNumberFormatter alloc] init];
-    [numberFormatter setMinimum:[NSNumber numberWithUnsignedInteger:0]];
-    [numberFormatter setMaximum:[NSNumber numberWithUnsignedInteger:255]];
-
-    // iterate through each octet, and test for a number between 0-255 or if it equals '*'
-    for (NSUInteger i = 0; i < num_octets; ++i) {
-        NSString* octet = [octets objectAtIndex:i];
-
-        if ([octet isEqualToString:@"*"]) { // passes - check next octet
-            continue;
-        } else if ([numberFormatter numberFromString:octet] == nil) { // fails - not a number and not within our range, return
-            return NO;
-        }
-    }
-
-    return YES;
-}
-
-- (void)addWhiteListEntry:(NSString*)origin
-{
-    if (self.whitelist == nil) {
-        return;
-    }
-
-    if ([origin isEqualToString:@"*"]) {
-        NSLog(@"Unlimited access to network resources");
-        self.whitelist = nil;
-        self.permittedSchemes = nil;
-    } else { // specific access
-        NSRegularExpression* parts = [NSRegularExpression regularExpressionWithPattern:@"^((\\*|[A-Za-z-]+)://)?(((\\*\\.)?[^*/:]+)|\\*)?(:(\\d+))?(/.*)?" options:0 error:nil];
-        NSTextCheckingResult* m = [parts firstMatchInString:origin options:NSMatchingAnchored range:NSMakeRange(0, [origin length])];
-        if (m != nil) {
-            NSRange r;
-            NSString* scheme = nil;
-            r = [m rangeAtIndex:2];
-            if (r.location != NSNotFound) {
-                scheme = [origin substringWithRange:r];
-            }
-
-            NSString* host = nil;
-            r = [m rangeAtIndex:3];
-            if (r.location != NSNotFound) {
-                host = [origin substringWithRange:r];
-            }
-
-            // Special case for two urls which are allowed to have empty hosts
-            if (([scheme isEqualToString:@"file"] || [scheme isEqualToString:@"content"]) && (host == nil)) {
-                host = @"*";
-            }
-
-            NSString* port = nil;
-            r = [m rangeAtIndex:7];
-            if (r.location != NSNotFound) {
-                port = [origin substringWithRange:r];
-            }
-
-            NSString* path = nil;
-            r = [m rangeAtIndex:8];
-            if (r.location != NSNotFound) {
-                path = [origin substringWithRange:r];
-            }
-
-            if (scheme == nil) {
-                // XXX making it stupid friendly for people who forget to include protocol/SSL
-                [self.whitelist addObject:[[CDVWhitelistPattern alloc] initWithScheme:@"http" host:host port:port path:path]];
-                [self.whitelist addObject:[[CDVWhitelistPattern alloc] initWithScheme:@"https" host:host port:port path:path]];
-            } else {
-                [self.whitelist addObject:[[CDVWhitelistPattern alloc] initWithScheme:scheme host:host port:port path:path]];
-            }
-
-            if (self.permittedSchemes != nil) {
-                if ([scheme isEqualToString:@"*"]) {
-                    self.permittedSchemes = nil;
-                } else if (scheme != nil) {
-                    [self.permittedSchemes addObject:scheme];
-                }
-            }
-        }
-    }
-}
-
-- (BOOL)schemeIsAllowed:(NSString*)scheme
-{
-    if ([scheme isEqualToString:@"http"] ||
-        [scheme isEqualToString:@"https"] ||
-        [scheme isEqualToString:@"ftp"] ||
-        [scheme isEqualToString:@"ftps"]) {
-        return YES;
-    }
-
-    return (self.permittedSchemes == nil) || [self.permittedSchemes containsObject:scheme];
-}
-
-- (BOOL)URLIsAllowed:(NSURL*)url
-{
-    return [self URLIsAllowed:url logFailure:YES];
-}
-
-- (BOOL)URLIsAllowed:(NSURL*)url logFailure:(BOOL)logFailure
-{
-    // Shortcut acceptance: Are all urls whitelisted ("*" in whitelist)?
-    if (whitelist == nil) {
-        return YES;
-    }
-
-    // Shortcut rejection: Check that the scheme is supported
-    NSString* scheme = [[url scheme] lowercaseString];
-    if (![self schemeIsAllowed:scheme]) {
-        if (logFailure) {
-            NSLog(@"%@", [self errorStringForURL:url]);
-        }
-        return NO;
-    }
-
-    // http[s] and ftp[s] should also validate against the common set in the kCDVDefaultSchemeName list
-    if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || [scheme isEqualToString:@"ftp"] || [scheme isEqualToString:@"ftps"]) {
-        NSURL* newUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@://%@%@", kCDVDefaultSchemeName, [url host], [[url path] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
-        // If it is allowed, we are done.  If not, continue to check for the actual scheme-specific list
-        if ([self URLIsAllowed:newUrl logFailure:NO]) {
-            return YES;
-        }
-    }
-
-    // Check the url against patterns in the whitelist
-    for (CDVWhitelistPattern* p in self.whitelist) {
-        if ([p matches:url]) {
-            return YES;
-        }
-    }
-
-    if (logFailure) {
-        NSLog(@"%@", [self errorStringForURL:url]);
-    }
-    // if we got here, the url host is not in the white-list, do nothing
-    return NO;
-}
-
-- (NSString*)errorStringForURL:(NSURL*)url
-{
-    return [NSString stringWithFormat:self.whitelistRejectionFormatString, [url absoluteString]];
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/NSData+Base64.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSData+Base64.h b/CordovaLib/Classes/NSData+Base64.h
deleted file mode 100644
index 02d960c..0000000
--- a/CordovaLib/Classes/NSData+Base64.h
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-//  NSData+Base64.h
-//  base64
-//
-//  Created by Matt Gallagher on 2009/06/03.
-//  Copyright 2009 Matt Gallagher. All rights reserved.
-//
-//  This software is provided 'as-is', without any express or implied
-//  warranty. In no event will the authors be held liable for any damages
-//  arising from the use of this software. Permission is granted to anyone to
-//  use this software for any purpose, including commercial applications, and to
-//  alter it and redistribute it freely, subject to the following restrictions:
-//
-//  1. The origin of this software must not be misrepresented; you must not
-//     claim that you wrote the original software. If you use this software
-//     in a product, an acknowledgment in the product documentation would be
-//     appreciated but is not required.
-//  2. Altered source versions must be plainly marked as such, and must not be
-//     misrepresented as being the original software.
-//  3. This notice may not be removed or altered from any source
-//     distribution.
-//
-
-#import <Foundation/Foundation.h>
-#import "CDVAvailabilityDeprecated.h"
-
-void *CDVNewBase64Decode(
-    const char* inputBuffer,
-    size_t    length,
-    size_t    * outputLength);
-
-char *CDVNewBase64Encode(
-    const void* inputBuffer,
-    size_t    length,
-    bool      separateLines,
-    size_t    * outputLength);
-
-@interface NSData (CDVBase64)
-
-+ (NSData*)cdv_dataFromBase64String:(NSString*)aString;
-- (NSString*)cdv_base64EncodedString;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/NSData+Base64.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSData+Base64.m b/CordovaLib/Classes/NSData+Base64.m
deleted file mode 100644
index 43560f0..0000000
--- a/CordovaLib/Classes/NSData+Base64.m
+++ /dev/null
@@ -1,298 +0,0 @@
-//
-//  NSData+Base64.m
-//  base64
-//
-//  Created by Matt Gallagher on 2009/06/03.
-//  Copyright 2009 Matt Gallagher. All rights reserved.
-//
-//  This software is provided 'as-is', without any express or implied
-//  warranty. In no event will the authors be held liable for any damages
-//  arising from the use of this software. Permission is granted to anyone to
-//  use this software for any purpose, including commercial applications, and to
-//  alter it and redistribute it freely, subject to the following restrictions:
-//
-//  1. The origin of this software must not be misrepresented; you must not
-//     claim that you wrote the original software. If you use this software
-//     in a product, an acknowledgment in the product documentation would be
-//     appreciated but is not required.
-//  2. Altered source versions must be plainly marked as such, and must not be
-//     misrepresented as being the original software.
-//  3. This notice may not be removed or altered from any source
-//     distribution.
-//
-
-#import "NSData+Base64.h"
-
-//
-// Mapping from 6 bit pattern to ASCII character.
-//
-static unsigned char base64EncodeLookup[65] =
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-//
-// Definition for "masked-out" areas of the base64DecodeLookup mapping
-//
-#define xx 65
-
-//
-// Mapping from ASCII character to 6 bit pattern.
-//
-static unsigned char base64DecodeLookup[256] =
-{
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 62, xx, xx, xx, 63,
-    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, xx, xx, xx, xx, xx, xx,
-    xx, 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  10, 11, 12, 13, 14,
-    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, xx, xx, xx, xx, xx,
-    xx, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-};
-
-//
-// Fundamental sizes of the binary and base64 encode/decode units in bytes
-//
-#define BINARY_UNIT_SIZE 3
-#define BASE64_UNIT_SIZE 4
-
-//
-// NewBase64Decode
-//
-// Decodes the base64 ASCII string in the inputBuffer to a newly malloced
-// output buffer.
-//
-//  inputBuffer - the source ASCII string for the decode
-//	length - the length of the string or -1 (to specify strlen should be used)
-//	outputLength - if not-NULL, on output will contain the decoded length
-//
-// returns the decoded buffer. Must be free'd by caller. Length is given by
-//	outputLength.
-//
-void *CDVNewBase64Decode(
-    const char* inputBuffer,
-    size_t    length,
-    size_t    * outputLength)
-{
-    if (length == -1) {
-        length = strlen(inputBuffer);
-    }
-
-    size_t outputBufferSize =
-        ((length + BASE64_UNIT_SIZE - 1) / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE;
-    unsigned char* outputBuffer = (unsigned char*)malloc(outputBufferSize);
-
-    size_t i = 0;
-    size_t j = 0;
-
-    while (i < length) {
-        //
-        // Accumulate 4 valid characters (ignore everything else)
-        //
-        unsigned char accumulated[BASE64_UNIT_SIZE];
-        size_t accumulateIndex = 0;
-
-        while (i < length) {
-            unsigned char decode = base64DecodeLookup[inputBuffer[i++]];
-            if (decode != xx) {
-                accumulated[accumulateIndex] = decode;
-                accumulateIndex++;
-
-                if (accumulateIndex == BASE64_UNIT_SIZE) {
-                    break;
-                }
-            }
-        }
-
-        //
-        // Store the 6 bits from each of the 4 characters as 3 bytes
-        //
-        // (Uses improved bounds checking suggested by Alexandre Colucci)
-        //
-        if (accumulateIndex >= 2) {
-            outputBuffer[j] = (accumulated[0] << 2) | (accumulated[1] >> 4);
-        }
-        if (accumulateIndex >= 3) {
-            outputBuffer[j + 1] = (accumulated[1] << 4) | (accumulated[2] >> 2);
-        }
-        if (accumulateIndex >= 4) {
-            outputBuffer[j + 2] = (accumulated[2] << 6) | accumulated[3];
-        }
-        j += accumulateIndex - 1;
-    }
-
-    if (outputLength) {
-        *outputLength = j;
-    }
-    return outputBuffer;
-}
-
-//
-// NewBase64Encode
-//
-// Encodes the arbitrary data in the inputBuffer as base64 into a newly malloced
-// output buffer.
-//
-//  inputBuffer - the source data for the encode
-//	length - the length of the input in bytes
-//  separateLines - if zero, no CR/LF characters will be added. Otherwise
-//		a CR/LF pair will be added every 64 encoded chars.
-//	outputLength - if not-NULL, on output will contain the encoded length
-//		(not including terminating 0 char)
-//
-// returns the encoded buffer. Must be free'd by caller. Length is given by
-//	outputLength.
-//
-char *CDVNewBase64Encode(
-    const void* buffer,
-    size_t    length,
-    bool      separateLines,
-    size_t    * outputLength)
-{
-    const unsigned char* inputBuffer = (const unsigned char*)buffer;
-
-#define MAX_NUM_PADDING_CHARS 2
-#define OUTPUT_LINE_LENGTH 64
-#define INPUT_LINE_LENGTH ((OUTPUT_LINE_LENGTH / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE)
-#define CR_LF_SIZE 2
-
-    //
-    // Byte accurate calculation of final buffer size
-    //
-    size_t outputBufferSize =
-        ((length / BINARY_UNIT_SIZE)
-        + ((length % BINARY_UNIT_SIZE) ? 1 : 0))
-        * BASE64_UNIT_SIZE;
-    if (separateLines) {
-        outputBufferSize +=
-            (outputBufferSize / OUTPUT_LINE_LENGTH) * CR_LF_SIZE;
-    }
-
-    //
-    // Include space for a terminating zero
-    //
-    outputBufferSize += 1;
-
-    //
-    // Allocate the output buffer
-    //
-    char* outputBuffer = (char*)malloc(outputBufferSize);
-    if (!outputBuffer) {
-        return NULL;
-    }
-
-    size_t i = 0;
-    size_t j = 0;
-    const size_t lineLength = separateLines ? INPUT_LINE_LENGTH : length;
-    size_t lineEnd = lineLength;
-
-    while (true) {
-        if (lineEnd > length) {
-            lineEnd = length;
-        }
-
-        for (; i + BINARY_UNIT_SIZE - 1 < lineEnd; i += BINARY_UNIT_SIZE) {
-            //
-            // Inner loop: turn 48 bytes into 64 base64 characters
-            //
-            outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
-            outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
-                | ((inputBuffer[i + 1] & 0xF0) >> 4)];
-            outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i + 1] & 0x0F) << 2)
-                | ((inputBuffer[i + 2] & 0xC0) >> 6)];
-            outputBuffer[j++] = base64EncodeLookup[inputBuffer[i + 2] & 0x3F];
-        }
-
-        if (lineEnd == length) {
-            break;
-        }
-
-        //
-        // Add the newline
-        //
-        // outputBuffer[j++] = '\r';
-        // outputBuffer[j++] = '\n';
-        lineEnd += lineLength;
-    }
-
-    if (i + 1 < length) {
-        //
-        // Handle the single '=' case
-        //
-        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
-        outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
-            | ((inputBuffer[i + 1] & 0xF0) >> 4)];
-        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i + 1] & 0x0F) << 2];
-        outputBuffer[j++] = '=';
-    } else if (i < length) {
-        //
-        // Handle the double '=' case
-        //
-        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
-        outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0x03) << 4];
-        outputBuffer[j++] = '=';
-        outputBuffer[j++] = '=';
-    }
-    outputBuffer[j] = 0;
-
-    //
-    // Set the output length and return the buffer
-    //
-    if (outputLength) {
-        *outputLength = j;
-    }
-    return outputBuffer;
-}
-
-@implementation NSData (CDVBase64)
-
-//
-// dataFromBase64String:
-//
-// Creates an NSData object containing the base64 decoded representation of
-// the base64 string 'aString'
-//
-// Parameters:
-//    aString - the base64 string to decode
-//
-// returns the autoreleased NSData representation of the base64 string
-//
-+ (NSData*)cdv_dataFromBase64String:(NSString*)aString
-{
-    size_t outputLength = 0;
-    void* outputBuffer = CDVNewBase64Decode([aString UTF8String], [aString length], &outputLength);
-
-    return [NSData dataWithBytesNoCopy:outputBuffer length:outputLength freeWhenDone:YES];
-}
-
-//
-// base64EncodedString
-//
-// Creates an NSString object that contains the base 64 encoding of the
-// receiver's data. Lines are broken at 64 characters long.
-//
-// returns an autoreleased NSString being the base 64 representation of the
-//	receiver.
-//
-- (NSString*)cdv_base64EncodedString
-{
-    size_t outputLength = 0;
-    char* outputBuffer =
-        CDVNewBase64Encode([self bytes], [self length], true, &outputLength);
-
-    NSString* result = [[NSString alloc] initWithBytesNoCopy:outputBuffer
-                                                      length:outputLength
-                                                    encoding:NSASCIIStringEncoding
-                                                freeWhenDone:YES];
-
-    return result;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/NSDictionary+CordovaPreferences.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSDictionary+CordovaPreferences.h b/CordovaLib/Classes/NSDictionary+CordovaPreferences.h
deleted file mode 100644
index 9be2be2..0000000
--- a/CordovaLib/Classes/NSDictionary+CordovaPreferences.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-
-@interface NSDictionary (CordovaPreferences)
-
-- (id)cordovaSettingForKey:(NSString*)key;
-- (BOOL)cordovaBoolSettingForKey:(NSString*)key defaultValue:(BOOL)defaultValue;
-- (CGFloat)cordovaFloatSettingForKey:(NSString*)key defaultValue:(CGFloat)defaultValue;
-
-@end
-
-@interface NSMutableDictionary (CordovaPreferences)
-
-- (void)setCordovaSetting:(id)value forKey:(NSString*)key;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/NSDictionary+CordovaPreferences.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSDictionary+CordovaPreferences.m b/CordovaLib/Classes/NSDictionary+CordovaPreferences.m
deleted file mode 100644
index dcac40f..0000000
--- a/CordovaLib/Classes/NSDictionary+CordovaPreferences.m
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "NSDictionary+CordovaPreferences.h"
-#import <Foundation/Foundation.h>
-
-@implementation NSDictionary (CordovaPreferences)
-
-- (id)cordovaSettingForKey:(NSString*)key
-{
-    return [self objectForKey:[key lowercaseString]];
-}
-
-- (BOOL)cordovaBoolSettingForKey:(NSString*)key defaultValue:(BOOL)defaultValue
-{
-    BOOL value = defaultValue;
-    id prefObj = [self cordovaSettingForKey:key];
-
-    if (prefObj != nil) {
-        value = [(NSNumber*)prefObj boolValue];
-    }
-
-    return value;
-}
-
-- (CGFloat)cordovaFloatSettingForKey:(NSString*)key defaultValue:(CGFloat)defaultValue
-{
-    CGFloat value = defaultValue;
-    id prefObj = [self cordovaSettingForKey:key];
-
-    if (prefObj != nil) {
-        value = [prefObj floatValue];
-    }
-
-    return value;
-}
-
-@end
-
-@implementation NSMutableDictionary (CordovaPreferences)
-
-- (void)setCordovaSetting:(id)value forKey:(NSString*)key
-{
-    [self setObject:value forKey:[key lowercaseString]];
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/NSMutableArray+QueueAdditions.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSMutableArray+QueueAdditions.h b/CordovaLib/Classes/NSMutableArray+QueueAdditions.h
deleted file mode 100644
index 79e6516..0000000
--- a/CordovaLib/Classes/NSMutableArray+QueueAdditions.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-@interface NSMutableArray (QueueAdditions)
-
-- (id)cdv_pop;
-- (id)cdv_queueHead;
-- (id)cdv_dequeue;
-- (void)cdv_enqueue:(id)obj;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/NSMutableArray+QueueAdditions.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSMutableArray+QueueAdditions.m b/CordovaLib/Classes/NSMutableArray+QueueAdditions.m
deleted file mode 100644
index 2b3acdc..0000000
--- a/CordovaLib/Classes/NSMutableArray+QueueAdditions.m
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "NSMutableArray+QueueAdditions.h"
-
-@implementation NSMutableArray (QueueAdditions)
-
-- (id)cdv_queueHead
-{
-    if ([self count] == 0) {
-        return nil;
-    }
-
-    return [self objectAtIndex:0];
-}
-
-- (__autoreleasing id)cdv_dequeue
-{
-    if ([self count] == 0) {
-        return nil;
-    }
-
-    id head = [self objectAtIndex:0];
-    if (head != nil) {
-        // [[head retain] autorelease]; ARC - the __autoreleasing on the return value should so the same thing
-        [self removeObjectAtIndex:0];
-    }
-
-    return head;
-}
-
-- (id)cdv_pop
-{
-    return [self cdv_dequeue];
-}
-
-- (void)cdv_enqueue:(id)object
-{
-    [self addObject:object];
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/CDVDebug.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/CDVDebug.h b/CordovaLib/Classes/Private/CDVDebug.h
new file mode 100644
index 0000000..4a0d9f9
--- /dev/null
+++ b/CordovaLib/Classes/Private/CDVDebug.h
@@ -0,0 +1,25 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#ifdef DEBUG
+    #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
+#else
+    #define DLog(...)
+#endif
+#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/CDVJSON_private.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/CDVJSON_private.h b/CordovaLib/Classes/Private/CDVJSON_private.h
new file mode 100644
index 0000000..afb5cc6
--- /dev/null
+++ b/CordovaLib/Classes/Private/CDVJSON_private.h
@@ -0,0 +1,31 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+@interface NSArray (CDVJSONSerializingPrivate)
+- (NSString*)cdv_JSONString;
+@end
+
+@interface NSDictionary (CDVJSONSerializingPrivate)
+- (NSString*)cdv_JSONString;
+@end
+
+@interface NSString (CDVJSONSerializingPrivate)
+- (id)cdv_JSONObject;
+- (id)cdv_JSONFragment;
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/CDVJSON_private.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/CDVJSON_private.m b/CordovaLib/Classes/Private/CDVJSON_private.m
new file mode 100644
index 0000000..5385680
--- /dev/null
+++ b/CordovaLib/Classes/Private/CDVJSON_private.m
@@ -0,0 +1,91 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVJSON_private.h"
+#import <Foundation/NSJSONSerialization.h>
+
+@implementation NSArray (CDVJSONSerializingPrivate)
+
+- (NSString*)cdv_JSONString
+{
+    NSError* error = nil;
+    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
+                                                       options:0
+                                                         error:&error];
+
+    if (error != nil) {
+        NSLog(@"NSArray JSONString error: %@", [error localizedDescription]);
+        return nil;
+    } else {
+        return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
+    }
+}
+
+@end
+
+@implementation NSDictionary (CDVJSONSerializingPrivate)
+
+- (NSString*)cdv_JSONString
+{
+    NSError* error = nil;
+    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
+                                                       options:NSJSONWritingPrettyPrinted
+                                                         error:&error];
+
+    if (error != nil) {
+        NSLog(@"NSDictionary JSONString error: %@", [error localizedDescription]);
+        return nil;
+    } else {
+        return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
+    }
+}
+
+@end
+
+@implementation NSString (CDVJSONSerializingPrivate)
+
+- (id)cdv_JSONObject
+{
+    NSError* error = nil;
+    id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding]
+                                                options:NSJSONReadingMutableContainers
+                                                  error:&error];
+
+    if (error != nil) {
+        NSLog(@"NSString JSONObject error: %@", [error localizedDescription]);
+    }
+
+    return object;
+}
+
+- (id)cdv_JSONFragment
+{
+    NSError* error = nil;
+    id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding]
+                                                options:NSJSONReadingAllowFragments
+                                                  error:&error];
+
+    if (error != nil) {
+        NSLog(@"NSString JSONObject error: %@", [error localizedDescription]);
+    }
+
+    return object;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/CDVPlugin+Private.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/CDVPlugin+Private.h b/CordovaLib/Classes/Private/CDVPlugin+Private.h
new file mode 100644
index 0000000..f88638c
--- /dev/null
+++ b/CordovaLib/Classes/Private/CDVPlugin+Private.h
@@ -0,0 +1,24 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+@interface CDVPlugin (Private)
+
+- (instancetype)initWithWebViewEngine:(id <CDVWebViewEngineProtocol>)theWebViewEngine;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.h b/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.h
new file mode 100644
index 0000000..f9b0bff
--- /dev/null
+++ b/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.h
@@ -0,0 +1,27 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVPlugin.h"
+
+@interface CDVHandleOpenURL : CDVPlugin
+
+@property (nonatomic, strong) NSURL* url;
+@property (nonatomic, assign) BOOL pageLoaded;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.m b/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.m
new file mode 100644
index 0000000..60fbf8e
--- /dev/null
+++ b/CordovaLib/Classes/Private/Plugins/CDVHandleOpenURL/CDVHandleOpenURL.m
@@ -0,0 +1,86 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVHandleOpenURL.h"
+#import "CDV.h"
+
+@implementation CDVHandleOpenURL
+
+- (void)pluginInitialize
+{
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationLaunchedWithUrl:) name:CDVPluginHandleOpenURLNotification object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationPageDidLoad:) name:CDVPageDidLoadNotification object:nil];
+}
+
+- (void)applicationLaunchedWithUrl:(NSNotification*)notification
+{
+    NSURL* url = [notification object];
+
+    self.url = url;
+
+    // warm-start handler
+    if (self.pageLoaded) {
+        [self processOpenUrl:self.url pageLoaded:YES];
+        self.url = nil;
+    }
+}
+
+- (void)applicationPageDidLoad:(NSNotification*)notification
+{
+    // cold-start handler
+
+    self.pageLoaded = YES;
+
+    if (self.url) {
+        [self processOpenUrl:self.url pageLoaded:YES];
+        self.url = nil;
+    }
+}
+
+- (void)processOpenUrl:(NSURL*)url pageLoaded:(BOOL)pageLoaded
+{
+    __weak __typeof(self) weakSelf = self;
+
+    dispatch_block_t handleOpenUrl = ^(void) {
+        // calls into javascript global function 'handleOpenURL'
+        NSString* jsString = [NSString stringWithFormat:@"document.addEventListener('deviceready',function(){if (typeof handleOpenURL === 'function') { handleOpenURL(\"%@\");}});", url];
+
+        [weakSelf.webViewEngine evaluateJavaScript:jsString completionHandler:nil];
+    };
+
+    if (!pageLoaded) {
+        NSString* jsString = @"document.readystate";
+        [self.webViewEngine evaluateJavaScript:jsString
+                             completionHandler:^(id object, NSError* error) {
+            if ((error == nil) && [object isKindOfClass:[NSString class]]) {
+                NSString* readyState = (NSString*)object;
+                BOOL ready = [readyState isEqualToString:@"loaded"] || [readyState isEqualToString:@"complete"];
+                if (ready) {
+                    handleOpenUrl();
+                } else {
+                    self.url = url;
+                }
+            }
+        }];
+    } else {
+        handleOpenUrl();
+    }
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h b/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h
new file mode 100644
index 0000000..dec6ab3
--- /dev/null
+++ b/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h
@@ -0,0 +1,50 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVPlugin.h"
+
+#define kCDVLocalStorageErrorDomain @"kCDVLocalStorageErrorDomain"
+#define kCDVLocalStorageFileOperationError 1
+
+@interface CDVLocalStorage : CDVPlugin
+
+@property (nonatomic, readonly, strong) NSMutableArray* backupInfo;
+
+- (BOOL)shouldBackup;
+- (BOOL)shouldRestore;
+- (void)backup:(CDVInvokedUrlCommand*)command;
+- (void)restore:(CDVInvokedUrlCommand*)command;
+
++ (void)__fixupDatabaseLocationsWithBackupType:(NSString*)backupType;
+// Visible for testing.
++ (BOOL)__verifyAndFixDatabaseLocationsWithAppPlistDict:(NSMutableDictionary*)appPlistDict
+                                             bundlePath:(NSString*)bundlePath
+                                            fileManager:(NSFileManager*)fileManager;
+@end
+
+@interface CDVBackupInfo : NSObject
+
+@property (nonatomic, copy) NSString* original;
+@property (nonatomic, copy) NSString* backup;
+@property (nonatomic, copy) NSString* label;
+
+- (BOOL)shouldBackup;
+- (BOOL)shouldRestore;
+
+@end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[34/50] [abbrv] ios commit: CB-8690 - Group files into folders in CordovaLib/Classes

Posted by ia...@apache.org.
CB-8690 - Group files into folders in CordovaLib/Classes


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/d58fa4aa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/d58fa4aa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/d58fa4aa

Branch: refs/heads/unplug-whitelist
Commit: d58fa4aa8ff601748134d9f6e1587a4b3185cf95
Parents: 6fd8432
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Mar 17 17:51:22 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Mar 17 17:51:22 2015 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDV.h                        |  36 -
 CordovaLib/Classes/CDVAppDelegate.h             |  28 -
 CordovaLib/Classes/CDVAppDelegate.m             | 101 ---
 CordovaLib/Classes/CDVAvailability.h            |  96 --
 CordovaLib/Classes/CDVAvailabilityDeprecated.h  |  26 -
 CordovaLib/Classes/CDVCommandDelegate.h         |  53 --
 CordovaLib/Classes/CDVCommandDelegateImpl.h     |  36 -
 CordovaLib/Classes/CDVCommandDelegateImpl.m     | 187 ----
 CordovaLib/Classes/CDVCommandQueue.h            |  40 -
 CordovaLib/Classes/CDVCommandQueue.m            | 218 -----
 CordovaLib/Classes/CDVConfigParser.h            |  31 -
 CordovaLib/Classes/CDVConfigParser.m            |  88 --
 CordovaLib/Classes/CDVDebug.h                   |  25 -
 CordovaLib/Classes/CDVHandleOpenURL.h           |  27 -
 CordovaLib/Classes/CDVHandleOpenURL.m           |  86 --
 CordovaLib/Classes/CDVInvokedUrlCommand.h       |  52 --
 CordovaLib/Classes/CDVInvokedUrlCommand.m       | 117 ---
 CordovaLib/Classes/CDVJSON_private.h            |  31 -
 CordovaLib/Classes/CDVJSON_private.m            |  91 --
 CordovaLib/Classes/CDVLocalStorage.h            |  50 --
 CordovaLib/Classes/CDVLocalStorage.m            | 487 ----------
 CordovaLib/Classes/CDVPlugin+Private.h          |  24 -
 CordovaLib/Classes/CDVPlugin+Resources.h        |  39 -
 CordovaLib/Classes/CDVPlugin+Resources.m        |  38 -
 CordovaLib/Classes/CDVPlugin.h                  |  69 --
 CordovaLib/Classes/CDVPlugin.m                  | 163 ----
 CordovaLib/Classes/CDVPluginResult.h            |  64 --
 CordovaLib/Classes/CDVPluginResult.m            | 177 ----
 .../Classes/CDVScreenOrientationDelegate.h      |  28 -
 CordovaLib/Classes/CDVTimer.h                   |  27 -
 CordovaLib/Classes/CDVTimer.m                   | 123 ---
 CordovaLib/Classes/CDVUIWebViewDelegate.h       |  41 -
 CordovaLib/Classes/CDVUIWebViewDelegate.m       | 399 ---------
 CordovaLib/Classes/CDVUIWebViewEngine.h         |  27 -
 CordovaLib/Classes/CDVUIWebViewEngine.m         | 186 ----
 CordovaLib/Classes/CDVURLProtocol.h             |  29 -
 CordovaLib/Classes/CDVURLProtocol.m             | 213 -----
 CordovaLib/Classes/CDVUserAgentUtil.h           |  27 -
 CordovaLib/Classes/CDVUserAgentUtil.m           | 122 ---
 CordovaLib/Classes/CDVViewController.h          |  87 --
 CordovaLib/Classes/CDVViewController.m          | 878 -------------------
 CordovaLib/Classes/CDVWebViewEngineProtocol.h   |  41 -
 CordovaLib/Classes/CDVWhitelist.h               |  34 -
 CordovaLib/Classes/CDVWhitelist.m               | 285 ------
 CordovaLib/Classes/NSData+Base64.h              |  43 -
 CordovaLib/Classes/NSData+Base64.m              | 298 -------
 .../Classes/NSDictionary+CordovaPreferences.h   |  35 -
 .../Classes/NSDictionary+CordovaPreferences.m   |  63 --
 .../Classes/NSMutableArray+QueueAdditions.h     |  29 -
 .../Classes/NSMutableArray+QueueAdditions.m     |  58 --
 CordovaLib/Classes/Private/CDVDebug.h           |  25 +
 CordovaLib/Classes/Private/CDVJSON_private.h    |  31 +
 CordovaLib/Classes/Private/CDVJSON_private.m    |  91 ++
 CordovaLib/Classes/Private/CDVPlugin+Private.h  |  24 +
 .../Plugins/CDVHandleOpenURL/CDVHandleOpenURL.h |  27 +
 .../Plugins/CDVHandleOpenURL/CDVHandleOpenURL.m |  86 ++
 .../Plugins/CDVLocalStorage/CDVLocalStorage.h   |  50 ++
 .../Plugins/CDVLocalStorage/CDVLocalStorage.m   | 487 ++++++++++
 .../CDVUIWebViewEngine/CDVUIWebViewDelegate.h   |  41 +
 .../CDVUIWebViewEngine/CDVUIWebViewDelegate.m   | 399 +++++++++
 .../CDVUIWebViewEngine/CDVUIWebViewEngine.h     |  27 +
 .../CDVUIWebViewEngine/CDVUIWebViewEngine.m     | 186 ++++
 CordovaLib/Classes/Public/CDV.h                 |  36 +
 CordovaLib/Classes/Public/CDVAppDelegate.h      |  28 +
 CordovaLib/Classes/Public/CDVAppDelegate.m      | 101 +++
 CordovaLib/Classes/Public/CDVAvailability.h     |  96 ++
 .../Classes/Public/CDVAvailabilityDeprecated.h  |  26 +
 CordovaLib/Classes/Public/CDVCommandDelegate.h  |  53 ++
 .../Classes/Public/CDVCommandDelegateImpl.h     |  36 +
 .../Classes/Public/CDVCommandDelegateImpl.m     | 187 ++++
 CordovaLib/Classes/Public/CDVCommandQueue.h     |  40 +
 CordovaLib/Classes/Public/CDVCommandQueue.m     | 218 +++++
 CordovaLib/Classes/Public/CDVConfigParser.h     |  31 +
 CordovaLib/Classes/Public/CDVConfigParser.m     |  88 ++
 .../Classes/Public/CDVInvokedUrlCommand.h       |  52 ++
 .../Classes/Public/CDVInvokedUrlCommand.m       | 117 +++
 CordovaLib/Classes/Public/CDVPlugin+Resources.h |  39 +
 CordovaLib/Classes/Public/CDVPlugin+Resources.m |  38 +
 CordovaLib/Classes/Public/CDVPlugin.h           |  69 ++
 CordovaLib/Classes/Public/CDVPlugin.m           | 163 ++++
 CordovaLib/Classes/Public/CDVPluginResult.h     |  64 ++
 CordovaLib/Classes/Public/CDVPluginResult.m     | 177 ++++
 .../Public/CDVScreenOrientationDelegate.h       |  28 +
 CordovaLib/Classes/Public/CDVTimer.h            |  27 +
 CordovaLib/Classes/Public/CDVTimer.m            | 123 +++
 CordovaLib/Classes/Public/CDVURLProtocol.h      |  29 +
 CordovaLib/Classes/Public/CDVURLProtocol.m      | 213 +++++
 CordovaLib/Classes/Public/CDVUserAgentUtil.h    |  27 +
 CordovaLib/Classes/Public/CDVUserAgentUtil.m    | 122 +++
 CordovaLib/Classes/Public/CDVViewController.h   |  87 ++
 CordovaLib/Classes/Public/CDVViewController.m   | 878 +++++++++++++++++++
 .../Classes/Public/CDVWebViewEngineProtocol.h   |  41 +
 CordovaLib/Classes/Public/CDVWhitelist.h        |  34 +
 CordovaLib/Classes/Public/CDVWhitelist.m        | 285 ++++++
 CordovaLib/Classes/Public/NSData+Base64.h       |  43 +
 CordovaLib/Classes/Public/NSData+Base64.m       | 298 +++++++
 .../Public/NSDictionary+CordovaPreferences.h    |  35 +
 .../Public/NSDictionary+CordovaPreferences.m    |  63 ++
 .../Public/NSMutableArray+QueueAdditions.h      |  29 +
 .../Public/NSMutableArray+QueueAdditions.m      |  58 ++
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj | 434 ++++-----
 101 files changed, 5788 insertions(+), 5752 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDV.h b/CordovaLib/Classes/CDV.h
deleted file mode 100644
index fbeaea2..0000000
--- a/CordovaLib/Classes/CDV.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVAvailability.h"
-#import "CDVAvailabilityDeprecated.h"
-#import "CDVAppDelegate.h"
-#import "CDVPlugin.h"
-#import "CDVPluginResult.h"
-#import "CDVViewController.h"
-#import "CDVCommandDelegate.h"
-#import "CDVURLProtocol.h"
-#import "CDVInvokedUrlCommand.h"
-#import "CDVWhitelist.h"
-#import "CDVLocalStorage.h"
-#import "CDVPlugin.h"
-#import "CDVPluginResult.h"
-#import "CDVScreenOrientationDelegate.h"
-#import "CDVTimer.h"
-#import "CDVUserAgentUtil.h"
-#import "NSData+Base64.h"

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVAppDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAppDelegate.h b/CordovaLib/Classes/CDVAppDelegate.h
deleted file mode 100644
index de5b518..0000000
--- a/CordovaLib/Classes/CDVAppDelegate.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-#import "CDVViewController.h"
-
-@interface CDVAppDelegate : NSObject <UIApplicationDelegate>{}
-
-@property (nonatomic, strong) IBOutlet UIWindow* window;
-@property (nonatomic, strong) IBOutlet CDVViewController* viewController;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVAppDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAppDelegate.m b/CordovaLib/Classes/CDVAppDelegate.m
deleted file mode 100644
index 52f5837..0000000
--- a/CordovaLib/Classes/CDVAppDelegate.m
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVAppDelegate.h"
-
-@implementation CDVAppDelegate
-
-@synthesize window, viewController;
-
-- (id)init
-{
-    /** If you need to do any extra app-specific initialization, you can do it here
-     *  -jm
-     **/
-    NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
-
-    [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
-
-    int cacheSizeMemory = 8 * 1024 * 1024; // 8MB
-    int cacheSizeDisk = 32 * 1024 * 1024; // 32MB
-    NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
-    [NSURLCache setSharedURLCache:sharedCache];
-
-    self = [super init];
-    return self;
-}
-
-#pragma mark UIApplicationDelegate implementation
-
-/**
- * This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up)
- */
-- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
-{
-    CGRect screenBounds = [[UIScreen mainScreen] bounds];
-
-    self.window = [[UIWindow alloc] initWithFrame:screenBounds];
-    self.window.autoresizesSubviews = YES;
-
-    // only set if not already set in subclass
-    if (self.viewController == nil) {
-        self.viewController = [[CDVViewController alloc] init];
-    }
-
-    // Set your app's start page by setting the <content src='foo.html' /> tag in config.xml.
-    // If necessary, uncomment the line below to override it.
-    // self.viewController.startPage = @"index.html";
-
-    // NOTE: To customize the view's frame size (which defaults to full screen), override
-    // [self.viewController viewWillAppear:] in your view controller.
-
-    self.window.rootViewController = self.viewController;
-    [self.window makeKeyAndVisible];
-
-    return YES;
-}
-
-// this happens while we are running ( in the background, or from within our own app )
-// only valid if 40x-Info.plist specifies a protocol to handle
-- (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation
-{
-    if (!url) {
-        return NO;
-    }
-
-    // all plugins will get the notification, and their handlers will be called
-    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
-
-    return YES;
-}
-
-- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
-{
-    // iPhone doesn't support upside down by default, while the iPad does.  Override to allow all orientations always, and let the root view controller decide what's allowed (the supported orientations mask gets intersected).
-    NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown);
-
-    return supportedInterfaceOrientations;
-}
-
-- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application
-{
-    [[NSURLCache sharedURLCache] removeAllCachedResponses];
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVAvailability.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAvailability.h b/CordovaLib/Classes/CDVAvailability.h
deleted file mode 100644
index 40d5489..0000000
--- a/CordovaLib/Classes/CDVAvailability.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVAvailabilityDeprecated.h"
-
-#define __CORDOVA_IOS__
-
-#define __CORDOVA_0_9_6 906
-#define __CORDOVA_1_0_0 10000
-#define __CORDOVA_1_1_0 10100
-#define __CORDOVA_1_2_0 10200
-#define __CORDOVA_1_3_0 10300
-#define __CORDOVA_1_4_0 10400
-#define __CORDOVA_1_4_1 10401
-#define __CORDOVA_1_5_0 10500
-#define __CORDOVA_1_6_0 10600
-#define __CORDOVA_1_6_1 10601
-#define __CORDOVA_1_7_0 10700
-#define __CORDOVA_1_8_0 10800
-#define __CORDOVA_1_8_1 10801
-#define __CORDOVA_1_9_0 10900
-#define __CORDOVA_2_0_0 20000
-#define __CORDOVA_2_1_0 20100
-#define __CORDOVA_2_2_0 20200
-#define __CORDOVA_2_3_0 20300
-#define __CORDOVA_2_4_0 20400
-#define __CORDOVA_2_5_0 20500
-#define __CORDOVA_2_6_0 20600
-#define __CORDOVA_2_7_0 20700
-#define __CORDOVA_2_8_0 20800
-#define __CORDOVA_2_9_0 20900
-#define __CORDOVA_3_0_0 30000
-#define __CORDOVA_3_1_0 30100
-#define __CORDOVA_3_2_0 30200
-#define __CORDOVA_3_3_0 30300
-#define __CORDOVA_3_4_0 30400
-#define __CORDOVA_3_4_1 30401
-#define __CORDOVA_3_5_0 30500
-#define __CORDOVA_3_6_0 30600
-#define __CORDOVA_3_7_0 30700
-#define __CORDOVA_3_8_0 30800
-#define __CORDOVA_4_0_0 40000
-/* coho:next-version,insert-before */
-#define __CORDOVA_NA 99999      /* not available */
-
-/*
- #if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_4_0_0
-    // do something when its at least 4.0.0
- #else
-    // do something else (non 4.0.0)
- #endif
- */
-#ifndef CORDOVA_VERSION_MIN_REQUIRED
-    /* coho:next-version-min-required,replace-after */
-    #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_4_0_0
-#endif
-
-/*
- Returns YES if it is at least version specified as NSString(X)
- Usage:
-     if (IsAtLeastiOSVersion(@"5.1")) {
-         // do something for iOS 5.1 or greater
-     }
- */
-#define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending)
-
-/* Return the string version of the decimal version */
-#define CDV_VERSION [NSString stringWithFormat:@"%d.%d.%d", \
-    (CORDOVA_VERSION_MIN_REQUIRED / 10000),                 \
-    (CORDOVA_VERSION_MIN_REQUIRED % 10000) / 100,           \
-    (CORDOVA_VERSION_MIN_REQUIRED % 10000) % 100]
-
-// Enable this to log all exec() calls.
-#define CDV_ENABLE_EXEC_LOGGING 0
-#if CDV_ENABLE_EXEC_LOGGING
-    #define CDV_EXEC_LOG NSLog
-#else
-    #define CDV_EXEC_LOG(...) do { \
-} while (NO)
-#endif

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVAvailabilityDeprecated.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAvailabilityDeprecated.h b/CordovaLib/Classes/CDVAvailabilityDeprecated.h
deleted file mode 100644
index abf7a16..0000000
--- a/CordovaLib/Classes/CDVAvailabilityDeprecated.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <UIKit/UIKit.h>
-
-#ifdef __clang__
-    #define CDV_DEPRECATED(version, msg) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg)))
-#else
-    #define CDV_DEPRECATED(version, msg) __attribute__((deprecated()))
-#endif

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVCommandDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCommandDelegate.h b/CordovaLib/Classes/CDVCommandDelegate.h
deleted file mode 100644
index 926278a..0000000
--- a/CordovaLib/Classes/CDVCommandDelegate.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVAvailability.h"
-#import "CDVInvokedUrlCommand.h"
-
-@class CDVPlugin;
-@class CDVPluginResult;
-@class CDVWhitelist;
-
-typedef NSURL* (^ UrlTransformerBlock)(NSURL*);
-
-@protocol CDVCommandDelegate <NSObject>
-
-@property (nonatomic, readonly) NSDictionary* settings;
-@property (nonatomic, copy) UrlTransformerBlock urlTransformer;
-
-- (NSString*)pathForResource:(NSString*)resourcepath;
-- (id)getCommandInstance:(NSString*)pluginName;
-
-// Sends a plugin result to the JS. This is thread-safe.
-- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId;
-// Evaluates the given JS. This is thread-safe.
-- (void)evalJs:(NSString*)js;
-// Can be used to evaluate JS right away instead of scheduling it on the run-loop.
-// This is required for dispatch resign and pause events, but should not be used
-// without reason. Without the run-loop delay, alerts used in JS callbacks may result
-// in dead-lock. This method must be called from the UI thread.
-- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop;
-// Runs the given block on a background thread using a shared thread-pool.
-- (void)runInBackground:(void (^)())block;
-// Returns the User-Agent of the associated UIWebView.
-- (NSString*)userAgent;
-// Returns whether the given URL passes the white-list.
-- (BOOL)URLIsWhitelisted:(NSURL*)url;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVCommandDelegateImpl.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCommandDelegateImpl.h b/CordovaLib/Classes/CDVCommandDelegateImpl.h
deleted file mode 100644
index 0531134..0000000
--- a/CordovaLib/Classes/CDVCommandDelegateImpl.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <UIKit/UIKit.h>
-#import "CDVCommandDelegate.h"
-
-@class CDVViewController;
-@class CDVCommandQueue;
-
-@interface CDVCommandDelegateImpl : NSObject <CDVCommandDelegate>{
-    @private
-    __weak CDVViewController* _viewController;
-    NSRegularExpression* _callbackIdPattern;
-    @protected
-    __weak CDVCommandQueue* _commandQueue;
-    BOOL _delayResponses;
-}
-- (id)initWithViewController:(CDVViewController*)viewController;
-- (void)flushCommandQueueWithDelayedJs;
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVCommandDelegateImpl.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCommandDelegateImpl.m b/CordovaLib/Classes/CDVCommandDelegateImpl.m
deleted file mode 100644
index d4df6c3..0000000
--- a/CordovaLib/Classes/CDVCommandDelegateImpl.m
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVCommandDelegateImpl.h"
-#import "CDVJSON_private.h"
-#import "CDVCommandQueue.h"
-#import "CDVPluginResult.h"
-#import "CDVViewController.h"
-
-@implementation CDVCommandDelegateImpl
-
-@synthesize urlTransformer;
-
-- (id)initWithViewController:(CDVViewController*)viewController
-{
-    self = [super init];
-    if (self != nil) {
-        _viewController = viewController;
-        _commandQueue = _viewController.commandQueue;
-
-        NSError* err = nil;
-        _callbackIdPattern = [NSRegularExpression regularExpressionWithPattern:@"[^A-Za-z0-9._-]" options:0 error:&err];
-        if (err != nil) {
-            // Couldn't initialize Regex
-            NSLog(@"Error: Couldn't initialize regex");
-            _callbackIdPattern = nil;
-        }
-    }
-    return self;
-}
-
-- (NSString*)pathForResource:(NSString*)resourcepath
-{
-    NSBundle* mainBundle = [NSBundle mainBundle];
-    NSMutableArray* directoryParts = [NSMutableArray arrayWithArray:[resourcepath componentsSeparatedByString:@"/"]];
-    NSString* filename = [directoryParts lastObject];
-
-    [directoryParts removeLastObject];
-
-    NSString* directoryPartsJoined = [directoryParts componentsJoinedByString:@"/"];
-    NSString* directoryStr = _viewController.wwwFolderName;
-
-    if ([directoryPartsJoined length] > 0) {
-        directoryStr = [NSString stringWithFormat:@"%@/%@", _viewController.wwwFolderName, [directoryParts componentsJoinedByString:@"/"]];
-    }
-
-    return [mainBundle pathForResource:filename ofType:@"" inDirectory:directoryStr];
-}
-
-- (void)flushCommandQueueWithDelayedJs
-{
-    _delayResponses = YES;
-    [_commandQueue executePending];
-    _delayResponses = NO;
-}
-
-- (void)evalJsHelper2:(NSString*)js
-{
-    CDV_EXEC_LOG(@"Exec: evalling: %@", [js substringToIndex:MIN([js length], 160)]);
-    [_viewController.webViewEngine evaluateJavaScript:js completionHandler:^(id obj, NSError* error) {
-        // TODO: obj can be something other than string
-        if ([obj isKindOfClass:[NSString class]]) {
-            NSString* commandsJSON = (NSString*)obj;
-            if ([commandsJSON length] > 0) {
-                CDV_EXEC_LOG(@"Exec: Retrieved new exec messages by chaining.");
-            }
-
-            [_commandQueue enqueueCommandBatch:commandsJSON];
-            [_commandQueue executePending];
-        }
-    }];
-}
-
-- (void)evalJsHelper:(NSString*)js
-{
-    // Cycle the run-loop before executing the JS.
-    // For _delayResponses -
-    //    This ensures that we don't eval JS during the middle of an existing JS
-    //    function (possible since UIWebViewDelegate callbacks can be synchronous).
-    // For !isMainThread -
-    //    It's a hard error to eval on the non-UI thread.
-    // For !_commandQueue.currentlyExecuting -
-    //     This works around a bug where sometimes alerts() within callbacks can cause
-    //     dead-lock.
-    //     If the commandQueue is currently executing, then we know that it is safe to
-    //     execute the callback immediately.
-    // Using    (dispatch_get_main_queue()) does *not* fix deadlocks for some reason,
-    // but performSelectorOnMainThread: does.
-    if (_delayResponses || ![NSThread isMainThread] || !_commandQueue.currentlyExecuting) {
-        [self performSelectorOnMainThread:@selector(evalJsHelper2:) withObject:js waitUntilDone:NO];
-    } else {
-        [self evalJsHelper2:js];
-    }
-}
-
-- (BOOL)isValidCallbackId:(NSString*)callbackId
-{
-    if ((callbackId == nil) || (_callbackIdPattern == nil)) {
-        return NO;
-    }
-
-    // Disallow if too long or if any invalid characters were found.
-    if (([callbackId length] > 100) || [_callbackIdPattern firstMatchInString:callbackId options:0 range:NSMakeRange(0, [callbackId length])]) {
-        return NO;
-    }
-    return YES;
-}
-
-- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId
-{
-    CDV_EXEC_LOG(@"Exec(%@): Sending result. Status=%@", callbackId, result.status);
-    // This occurs when there is are no win/fail callbacks for the call.
-    if ([@"INVALID" isEqualToString:callbackId]) {
-        return;
-    }
-    // This occurs when the callback id is malformed.
-    if (![self isValidCallbackId:callbackId]) {
-        NSLog(@"Invalid callback id received by sendPluginResult");
-        return;
-    }
-    int status = [result.status intValue];
-    BOOL keepCallback = [result.keepCallback boolValue];
-    NSString* argumentsAsJSON = [result argumentsAsJSON];
-
-    NSString* js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeCallback('%@',%d,%@,%d)", callbackId, status, argumentsAsJSON, keepCallback];
-
-    [self evalJsHelper:js];
-}
-
-- (void)evalJs:(NSString*)js
-{
-    [self evalJs:js scheduledOnRunLoop:YES];
-}
-
-- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop
-{
-    js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeEvalAndFetch(function(){%@})", js];
-    if (scheduledOnRunLoop) {
-        [self evalJsHelper:js];
-    } else {
-        [self evalJsHelper2:js];
-    }
-}
-
-- (id)getCommandInstance:(NSString*)pluginName
-{
-    return [_viewController getCommandInstance:pluginName];
-}
-
-- (void)runInBackground:(void (^)())block
-{
-    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block);
-}
-
-- (NSString*)userAgent
-{
-    return [_viewController userAgent];
-}
-
-- (BOOL)URLIsWhitelisted:(NSURL*)url
-{
-    return ![_viewController.whitelist schemeIsAllowed:[url scheme]] ||
-           [_viewController.whitelist URLIsAllowed:url logFailure:NO];
-}
-
-- (NSDictionary*)settings
-{
-    return _viewController.settings;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVCommandQueue.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCommandQueue.h b/CordovaLib/Classes/CDVCommandQueue.h
deleted file mode 100644
index 3329078..0000000
--- a/CordovaLib/Classes/CDVCommandQueue.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-@class CDVInvokedUrlCommand;
-@class CDVViewController;
-
-@interface CDVCommandQueue : NSObject
-
-@property (nonatomic, readonly) BOOL currentlyExecuting;
-
-- (id)initWithViewController:(CDVViewController*)viewController;
-- (void)dispose;
-
-- (void)resetRequestId;
-- (void)enqueueCommandBatch:(NSString*)batchJSON;
-
-- (void)processXhrExecBridgePoke:(NSNumber*)requestId;
-- (void)fetchCommandsFromJs;
-- (void)executePending;
-- (BOOL)execute:(CDVInvokedUrlCommand*)command;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVCommandQueue.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCommandQueue.m b/CordovaLib/Classes/CDVCommandQueue.m
deleted file mode 100644
index d2f71cb..0000000
--- a/CordovaLib/Classes/CDVCommandQueue.m
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#include <objc/message.h>
-#import "CDVCommandQueue.h"
-#import "CDVViewController.h"
-#import "CDVCommandDelegateImpl.h"
-#import "CDVJSON_private.h"
-#import "CDVDebug.h"
-
-// Parse JS on the main thread if it's shorter than this.
-static const NSInteger JSON_SIZE_FOR_MAIN_THREAD = 4 * 1024; // Chosen arbitrarily.
-// Execute multiple commands in one go until this many seconds have passed.
-static const double MAX_EXECUTION_TIME = .008; // Half of a 60fps frame.
-
-@interface CDVCommandQueue () {
-    NSInteger _lastCommandQueueFlushRequestId;
-    __weak CDVViewController* _viewController;
-    NSMutableArray* _queue;
-    NSTimeInterval _startExecutionTime;
-}
-@end
-
-@implementation CDVCommandQueue
-
-- (BOOL)currentlyExecuting
-{
-    return _startExecutionTime > 0;
-}
-
-- (id)initWithViewController:(CDVViewController*)viewController
-{
-    self = [super init];
-    if (self != nil) {
-        _viewController = viewController;
-        _queue = [[NSMutableArray alloc] init];
-    }
-    return self;
-}
-
-- (void)dispose
-{
-    // TODO(agrieve): Make this a zeroing weak ref once we drop support for 4.3.
-    _viewController = nil;
-}
-
-- (void)resetRequestId
-{
-    _lastCommandQueueFlushRequestId = 0;
-}
-
-- (void)enqueueCommandBatch:(NSString*)batchJSON
-{
-    if ([batchJSON length] > 0) {
-        NSMutableArray* commandBatchHolder = [[NSMutableArray alloc] init];
-        [_queue addObject:commandBatchHolder];
-        if ([batchJSON length] < JSON_SIZE_FOR_MAIN_THREAD) {
-            [commandBatchHolder addObject:[batchJSON cdv_JSONObject]];
-        } else {
-            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^() {
-                NSMutableArray* result = [batchJSON cdv_JSONObject];
-                @synchronized(commandBatchHolder) {
-                    [commandBatchHolder addObject:result];
-                }
-                [self performSelectorOnMainThread:@selector(executePending) withObject:nil waitUntilDone:NO];
-            });
-        }
-    }
-}
-
-- (void)processXhrExecBridgePoke:(NSNumber*)requestId
-{
-    NSInteger rid = [requestId integerValue];
-
-    // An ID of 1 is a special case because that signifies the first request of
-    // the page. Since resetRequestId is called from webViewDidStartLoad, and the
-    // JS context at the time of webViewDidStartLoad is still that of the previous
-    // page, it's possible for requests from the previous page to come in after this
-    // point. We ignore these by enforcing that ID=1 be the first ID.
-    if ((_lastCommandQueueFlushRequestId == 0) && (rid != 1)) {
-        CDV_EXEC_LOG(@"Exec: Ignoring exec request from previous page.");
-        return;
-    }
-
-    // Use the request ID to determine if we've already flushed for this request.
-    // This is required only because the NSURLProtocol enqueues the same request
-    // multiple times.
-    if (rid > _lastCommandQueueFlushRequestId) {
-        _lastCommandQueueFlushRequestId = [requestId integerValue];
-        [self fetchCommandsFromJs];
-        [self executePending];
-    }
-}
-
-- (void)fetchCommandsFromJs
-{
-    __weak CDVCommandQueue* weakSelf = self;
-    NSString* js = @"cordova.require('cordova/exec').nativeFetchMessages()";
-
-    [_viewController.webViewEngine evaluateJavaScript:js
-                                    completionHandler:^(id obj, NSError* error) {
-        if ((error == nil) && [obj isKindOfClass:[NSString class]]) {
-            NSString* queuedCommandsJSON = (NSString*)obj;
-            CDV_EXEC_LOG(@"Exec: Flushed JS->native queue (hadCommands=%d).", [queuedCommandsJSON length] > 0);
-            [weakSelf enqueueCommandBatch:queuedCommandsJSON];
-            // this has to be called here now, because fetchCommandsFromJs is now async (previously: synchronous)
-            [self executePending];
-        }
-    }];
-}
-
-- (void)executePending
-{
-    // Make us re-entrant-safe.
-    if (_startExecutionTime > 0) {
-        return;
-    }
-    @try {
-        _startExecutionTime = [NSDate timeIntervalSinceReferenceDate];
-
-        while ([_queue count] > 0) {
-            NSMutableArray* commandBatchHolder = _queue[0];
-            NSMutableArray* commandBatch = nil;
-            @synchronized(commandBatchHolder) {
-                // If the next-up command is still being decoded, wait for it.
-                if ([commandBatchHolder count] == 0) {
-                    break;
-                }
-                commandBatch = commandBatchHolder[0];
-            }
-
-            while ([commandBatch count] > 0) {
-                @autoreleasepool {
-                    // Execute the commands one-at-a-time.
-                    NSArray* jsonEntry = [commandBatch cdv_dequeue];
-                    if ([commandBatch count] == 0) {
-                        [_queue removeObjectAtIndex:0];
-                    }
-                    CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonEntry];
-                    CDV_EXEC_LOG(@"Exec(%@): Calling %@.%@", command.callbackId, command.className, command.methodName);
-
-                    if (![self execute:command]) {
-#ifdef DEBUG
-                            NSString* commandJson = [jsonEntry cdv_JSONString];
-                            static NSUInteger maxLogLength = 1024;
-                            NSString* commandString = ([commandJson length] > maxLogLength) ?
-                                [NSString stringWithFormat : @"%@[...]", [commandJson substringToIndex:maxLogLength]] :
-                                commandJson;
-
-                            DLog(@"FAILED pluginJSON = %@", commandString);
-#endif
-                    }
-                }
-
-                // Yield if we're taking too long.
-                if (([_queue count] > 0) && ([NSDate timeIntervalSinceReferenceDate] - _startExecutionTime > MAX_EXECUTION_TIME)) {
-                    [self performSelector:@selector(executePending) withObject:nil afterDelay:0];
-                    return;
-                }
-            }
-        }
-    } @finally
-    {
-        _startExecutionTime = 0;
-    }
-}
-
-- (BOOL)execute:(CDVInvokedUrlCommand*)command
-{
-    if ((command.className == nil) || (command.methodName == nil)) {
-        NSLog(@"ERROR: Classname and/or methodName not found for command.");
-        return NO;
-    }
-
-    // Fetch an instance of this class
-    CDVPlugin* obj = [_viewController.commandDelegate getCommandInstance:command.className];
-
-    if (!([obj isKindOfClass:[CDVPlugin class]])) {
-        NSLog(@"ERROR: Plugin '%@' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.", command.className);
-        return NO;
-    }
-    BOOL retVal = YES;
-    double started = [[NSDate date] timeIntervalSince1970] * 1000.0;
-    // Find the proper selector to call.
-    NSString* methodName = [NSString stringWithFormat:@"%@:", command.methodName];
-    SEL normalSelector = NSSelectorFromString(methodName);
-    if ([obj respondsToSelector:normalSelector]) {
-        // [obj performSelector:normalSelector withObject:command];
-        ((void (*)(id, SEL, id))objc_msgSend)(obj, normalSelector, command);
-    } else {
-        // There's no method to call, so throw an error.
-        NSLog(@"ERROR: Method '%@' not defined in Plugin '%@'", methodName, command.className);
-        retVal = NO;
-    }
-    double elapsed = [[NSDate date] timeIntervalSince1970] * 1000.0 - started;
-    if (elapsed > 10) {
-        NSLog(@"THREAD WARNING: ['%@'] took '%f' ms. Plugin should use a background thread.", command.className, elapsed);
-    }
-    return retVal;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVConfigParser.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVConfigParser.h b/CordovaLib/Classes/CDVConfigParser.h
deleted file mode 100644
index 2e06c88..0000000
--- a/CordovaLib/Classes/CDVConfigParser.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-@interface CDVConfigParser : NSObject <NSXMLParserDelegate>
-{
-    NSString* featureName;
-}
-
-@property (nonatomic, readonly, strong) NSMutableDictionary* pluginsDict;
-@property (nonatomic, readonly, strong) NSMutableDictionary* settings;
-@property (nonatomic, readonly, strong) NSMutableArray* whitelistHosts;
-@property (nonatomic, readonly, strong) NSMutableArray* startupPluginNames;
-@property (nonatomic, readonly, strong) NSString* startPage;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVConfigParser.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVConfigParser.m b/CordovaLib/Classes/CDVConfigParser.m
deleted file mode 100644
index 4b73b60..0000000
--- a/CordovaLib/Classes/CDVConfigParser.m
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVConfigParser.h"
-
-@interface CDVConfigParser ()
-
-@property (nonatomic, readwrite, strong) NSMutableDictionary* pluginsDict;
-@property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
-@property (nonatomic, readwrite, strong) NSMutableArray* whitelistHosts;
-@property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
-@property (nonatomic, readwrite, strong) NSString* startPage;
-
-@end
-
-@implementation CDVConfigParser
-
-@synthesize pluginsDict, settings, whitelistHosts, startPage, startupPluginNames;
-
-- (id)init
-{
-    self = [super init];
-    if (self != nil) {
-        self.pluginsDict = [[NSMutableDictionary alloc] initWithCapacity:30];
-        self.settings = [[NSMutableDictionary alloc] initWithCapacity:30];
-        self.whitelistHosts = [[NSMutableArray alloc] initWithCapacity:30];
-        [self.whitelistHosts addObject:@"file:///*"];
-        [self.whitelistHosts addObject:@"content:///*"];
-        [self.whitelistHosts addObject:@"data:///*"];
-        self.startupPluginNames = [[NSMutableArray alloc] initWithCapacity:8];
-        featureName = nil;
-    }
-    return self;
-}
-
-- (void)parser:(NSXMLParser*)parser didStartElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName attributes:(NSDictionary*)attributeDict
-{
-    if ([elementName isEqualToString:@"preference"]) {
-        settings[[attributeDict[@"name"] lowercaseString]] = attributeDict[@"value"];
-    } else if ([elementName isEqualToString:@"feature"]) { // store feature name to use with correct parameter set
-        featureName = [attributeDict[@"name"] lowercaseString];
-    } else if ((featureName != nil) && [elementName isEqualToString:@"param"]) {
-        NSString* paramName = [attributeDict[@"name"] lowercaseString];
-        id value = attributeDict[@"value"];
-        if ([paramName isEqualToString:@"ios-package"]) {
-            pluginsDict[featureName] = value;
-        }
-        BOOL paramIsOnload = ([paramName isEqualToString:@"onload"] && [@"true" isEqualToString : value]);
-        BOOL attribIsOnload = [@"true" isEqualToString :[attributeDict[@"onload"] lowercaseString]];
-        if (paramIsOnload || attribIsOnload) {
-            [self.startupPluginNames addObject:featureName];
-        }
-    } else if ([elementName isEqualToString:@"access"]) {
-        [whitelistHosts addObject:attributeDict[@"origin"]];
-    } else if ([elementName isEqualToString:@"content"]) {
-        self.startPage = attributeDict[@"src"];
-    }
-}
-
-- (void)parser:(NSXMLParser*)parser didEndElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName
-{
-    if ([elementName isEqualToString:@"feature"]) { // no longer handling a feature so release
-        featureName = nil;
-    }
-}
-
-- (void)parser:(NSXMLParser*)parser parseErrorOccurred:(NSError*)parseError
-{
-    NSAssert(NO, @"config.xml parse error line %ld col %ld", (long)[parser lineNumber], (long)[parser columnNumber]);
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVDebug.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVDebug.h b/CordovaLib/Classes/CDVDebug.h
deleted file mode 100644
index 4a0d9f9..0000000
--- a/CordovaLib/Classes/CDVDebug.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#ifdef DEBUG
-    #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
-#else
-    #define DLog(...)
-#endif
-#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVHandleOpenURL.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVHandleOpenURL.h b/CordovaLib/Classes/CDVHandleOpenURL.h
deleted file mode 100644
index f9b0bff..0000000
--- a/CordovaLib/Classes/CDVHandleOpenURL.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVPlugin.h"
-
-@interface CDVHandleOpenURL : CDVPlugin
-
-@property (nonatomic, strong) NSURL* url;
-@property (nonatomic, assign) BOOL pageLoaded;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVHandleOpenURL.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVHandleOpenURL.m b/CordovaLib/Classes/CDVHandleOpenURL.m
deleted file mode 100644
index 60fbf8e..0000000
--- a/CordovaLib/Classes/CDVHandleOpenURL.m
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVHandleOpenURL.h"
-#import "CDV.h"
-
-@implementation CDVHandleOpenURL
-
-- (void)pluginInitialize
-{
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationLaunchedWithUrl:) name:CDVPluginHandleOpenURLNotification object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationPageDidLoad:) name:CDVPageDidLoadNotification object:nil];
-}
-
-- (void)applicationLaunchedWithUrl:(NSNotification*)notification
-{
-    NSURL* url = [notification object];
-
-    self.url = url;
-
-    // warm-start handler
-    if (self.pageLoaded) {
-        [self processOpenUrl:self.url pageLoaded:YES];
-        self.url = nil;
-    }
-}
-
-- (void)applicationPageDidLoad:(NSNotification*)notification
-{
-    // cold-start handler
-
-    self.pageLoaded = YES;
-
-    if (self.url) {
-        [self processOpenUrl:self.url pageLoaded:YES];
-        self.url = nil;
-    }
-}
-
-- (void)processOpenUrl:(NSURL*)url pageLoaded:(BOOL)pageLoaded
-{
-    __weak __typeof(self) weakSelf = self;
-
-    dispatch_block_t handleOpenUrl = ^(void) {
-        // calls into javascript global function 'handleOpenURL'
-        NSString* jsString = [NSString stringWithFormat:@"document.addEventListener('deviceready',function(){if (typeof handleOpenURL === 'function') { handleOpenURL(\"%@\");}});", url];
-
-        [weakSelf.webViewEngine evaluateJavaScript:jsString completionHandler:nil];
-    };
-
-    if (!pageLoaded) {
-        NSString* jsString = @"document.readystate";
-        [self.webViewEngine evaluateJavaScript:jsString
-                             completionHandler:^(id object, NSError* error) {
-            if ((error == nil) && [object isKindOfClass:[NSString class]]) {
-                NSString* readyState = (NSString*)object;
-                BOOL ready = [readyState isEqualToString:@"loaded"] || [readyState isEqualToString:@"complete"];
-                if (ready) {
-                    handleOpenUrl();
-                } else {
-                    self.url = url;
-                }
-            }
-        }];
-    } else {
-        handleOpenUrl();
-    }
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVInvokedUrlCommand.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVInvokedUrlCommand.h b/CordovaLib/Classes/CDVInvokedUrlCommand.h
deleted file mode 100644
index 993e0a2..0000000
--- a/CordovaLib/Classes/CDVInvokedUrlCommand.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-@interface CDVInvokedUrlCommand : NSObject {
-    NSString* _callbackId;
-    NSString* _className;
-    NSString* _methodName;
-    NSArray* _arguments;
-}
-
-@property (nonatomic, readonly) NSArray* arguments;
-@property (nonatomic, readonly) NSString* callbackId;
-@property (nonatomic, readonly) NSString* className;
-@property (nonatomic, readonly) NSString* methodName;
-
-+ (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry;
-
-- (id)initWithArguments:(NSArray*)arguments
-             callbackId:(NSString*)callbackId
-              className:(NSString*)className
-             methodName:(NSString*)methodName;
-
-- (id)initFromJson:(NSArray*)jsonEntry;
-
-// Returns the argument at the given index.
-// If index >= the number of arguments, returns nil.
-// If the argument at the given index is NSNull, returns nil.
-- (id)argumentAtIndex:(NSUInteger)index;
-// Same as above, but returns defaultValue instead of nil.
-- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue;
-// Same as above, but returns defaultValue instead of nil, and if the argument is not of the expected class, returns defaultValue
-- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVInvokedUrlCommand.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVInvokedUrlCommand.m b/CordovaLib/Classes/CDVInvokedUrlCommand.m
deleted file mode 100644
index 3a5e8e7..0000000
--- a/CordovaLib/Classes/CDVInvokedUrlCommand.m
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVInvokedUrlCommand.h"
-#import "CDVJSON_private.h"
-#import "NSData+Base64.h"
-
-@implementation CDVInvokedUrlCommand
-
-@synthesize arguments = _arguments;
-@synthesize callbackId = _callbackId;
-@synthesize className = _className;
-@synthesize methodName = _methodName;
-
-+ (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry
-{
-    return [[CDVInvokedUrlCommand alloc] initFromJson:jsonEntry];
-}
-
-- (id)initFromJson:(NSArray*)jsonEntry
-{
-    id tmp = [jsonEntry objectAtIndex:0];
-    NSString* callbackId = tmp == [NSNull null] ? nil : tmp;
-    NSString* className = [jsonEntry objectAtIndex:1];
-    NSString* methodName = [jsonEntry objectAtIndex:2];
-    NSMutableArray* arguments = [jsonEntry objectAtIndex:3];
-
-    return [self initWithArguments:arguments
-                        callbackId:callbackId
-                         className:className
-                        methodName:methodName];
-}
-
-- (id)initWithArguments:(NSArray*)arguments
-             callbackId:(NSString*)callbackId
-              className:(NSString*)className
-             methodName:(NSString*)methodName
-{
-    self = [super init];
-    if (self != nil) {
-        _arguments = arguments;
-        _callbackId = callbackId;
-        _className = className;
-        _methodName = methodName;
-    }
-    [self massageArguments];
-    return self;
-}
-
-- (void)massageArguments
-{
-    NSMutableArray* newArgs = nil;
-
-    for (NSUInteger i = 0, count = [_arguments count]; i < count; ++i) {
-        id arg = [_arguments objectAtIndex:i];
-        if (![arg isKindOfClass:[NSDictionary class]]) {
-            continue;
-        }
-        NSDictionary* dict = arg;
-        NSString* type = [dict objectForKey:@"CDVType"];
-        if (!type || ![type isEqualToString:@"ArrayBuffer"]) {
-            continue;
-        }
-        NSString* data = [dict objectForKey:@"data"];
-        if (!data) {
-            continue;
-        }
-        if (newArgs == nil) {
-            newArgs = [NSMutableArray arrayWithArray:_arguments];
-            _arguments = newArgs;
-        }
-        [newArgs replaceObjectAtIndex:i withObject:[NSData cdv_dataFromBase64String:data]];
-    }
-}
-
-- (id)argumentAtIndex:(NSUInteger)index
-{
-    return [self argumentAtIndex:index withDefault:nil];
-}
-
-- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue
-{
-    return [self argumentAtIndex:index withDefault:defaultValue andClass:nil];
-}
-
-- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass
-{
-    if (index >= [_arguments count]) {
-        return defaultValue;
-    }
-    id ret = [_arguments objectAtIndex:index];
-    if (ret == [NSNull null]) {
-        ret = defaultValue;
-    }
-    if ((aClass != nil) && ![ret isKindOfClass:aClass]) {
-        ret = defaultValue;
-    }
-    return ret;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVJSON_private.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVJSON_private.h b/CordovaLib/Classes/CDVJSON_private.h
deleted file mode 100644
index afb5cc6..0000000
--- a/CordovaLib/Classes/CDVJSON_private.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-@interface NSArray (CDVJSONSerializingPrivate)
-- (NSString*)cdv_JSONString;
-@end
-
-@interface NSDictionary (CDVJSONSerializingPrivate)
-- (NSString*)cdv_JSONString;
-@end
-
-@interface NSString (CDVJSONSerializingPrivate)
-- (id)cdv_JSONObject;
-- (id)cdv_JSONFragment;
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVJSON_private.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVJSON_private.m b/CordovaLib/Classes/CDVJSON_private.m
deleted file mode 100644
index 5385680..0000000
--- a/CordovaLib/Classes/CDVJSON_private.m
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVJSON_private.h"
-#import <Foundation/NSJSONSerialization.h>
-
-@implementation NSArray (CDVJSONSerializingPrivate)
-
-- (NSString*)cdv_JSONString
-{
-    NSError* error = nil;
-    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
-                                                       options:0
-                                                         error:&error];
-
-    if (error != nil) {
-        NSLog(@"NSArray JSONString error: %@", [error localizedDescription]);
-        return nil;
-    } else {
-        return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-    }
-}
-
-@end
-
-@implementation NSDictionary (CDVJSONSerializingPrivate)
-
-- (NSString*)cdv_JSONString
-{
-    NSError* error = nil;
-    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
-                                                       options:NSJSONWritingPrettyPrinted
-                                                         error:&error];
-
-    if (error != nil) {
-        NSLog(@"NSDictionary JSONString error: %@", [error localizedDescription]);
-        return nil;
-    } else {
-        return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-    }
-}
-
-@end
-
-@implementation NSString (CDVJSONSerializingPrivate)
-
-- (id)cdv_JSONObject
-{
-    NSError* error = nil;
-    id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding]
-                                                options:NSJSONReadingMutableContainers
-                                                  error:&error];
-
-    if (error != nil) {
-        NSLog(@"NSString JSONObject error: %@", [error localizedDescription]);
-    }
-
-    return object;
-}
-
-- (id)cdv_JSONFragment
-{
-    NSError* error = nil;
-    id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding]
-                                                options:NSJSONReadingAllowFragments
-                                                  error:&error];
-
-    if (error != nil) {
-        NSLog(@"NSString JSONObject error: %@", [error localizedDescription]);
-    }
-
-    return object;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVLocalStorage.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVLocalStorage.h b/CordovaLib/Classes/CDVLocalStorage.h
deleted file mode 100644
index dec6ab3..0000000
--- a/CordovaLib/Classes/CDVLocalStorage.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVPlugin.h"
-
-#define kCDVLocalStorageErrorDomain @"kCDVLocalStorageErrorDomain"
-#define kCDVLocalStorageFileOperationError 1
-
-@interface CDVLocalStorage : CDVPlugin
-
-@property (nonatomic, readonly, strong) NSMutableArray* backupInfo;
-
-- (BOOL)shouldBackup;
-- (BOOL)shouldRestore;
-- (void)backup:(CDVInvokedUrlCommand*)command;
-- (void)restore:(CDVInvokedUrlCommand*)command;
-
-+ (void)__fixupDatabaseLocationsWithBackupType:(NSString*)backupType;
-// Visible for testing.
-+ (BOOL)__verifyAndFixDatabaseLocationsWithAppPlistDict:(NSMutableDictionary*)appPlistDict
-                                             bundlePath:(NSString*)bundlePath
-                                            fileManager:(NSFileManager*)fileManager;
-@end
-
-@interface CDVBackupInfo : NSObject
-
-@property (nonatomic, copy) NSString* original;
-@property (nonatomic, copy) NSString* backup;
-@property (nonatomic, copy) NSString* label;
-
-- (BOOL)shouldBackup;
-- (BOOL)shouldRestore;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVLocalStorage.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVLocalStorage.m b/CordovaLib/Classes/CDVLocalStorage.m
deleted file mode 100644
index 252dfaf..0000000
--- a/CordovaLib/Classes/CDVLocalStorage.m
+++ /dev/null
@@ -1,487 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVLocalStorage.h"
-#import "CDV.h"
-
-@interface CDVLocalStorage ()
-
-@property (nonatomic, readwrite, strong) NSMutableArray* backupInfo;  // array of CDVBackupInfo objects
-@property (nonatomic, readwrite, weak) id <UIWebViewDelegate> webviewDelegate;
-
-@end
-
-@implementation CDVLocalStorage
-
-@synthesize backupInfo, webviewDelegate;
-
-- (void)pluginInitialize
-{
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResignActive)
-                                                 name:UIApplicationWillResignActiveNotification object:nil];
-    BOOL cloudBackup = [@"cloud" isEqualToString : self.commandDelegate.settings[[@"BackupWebStorage" lowercaseString]]];
-
-    self.backupInfo = [[self class] createBackupInfoWithCloudBackup:cloudBackup];
-}
-
-#pragma mark -
-#pragma mark Plugin interface methods
-
-+ (NSMutableArray*)createBackupInfoWithTargetDir:(NSString*)targetDir backupDir:(NSString*)backupDir targetDirNests:(BOOL)targetDirNests backupDirNests:(BOOL)backupDirNests rename:(BOOL)rename
-{
-    /*
-     This "helper" does so much work and has so many options it would probably be clearer to refactor the whole thing.
-     Basically, there are three database locations:
-
-     1. "Normal" dir -- LIB/<nested dires WebKit/LocalStorage etc>/<normal filenames>
-     2. "Caches" dir -- LIB/Caches/<normal filenames>
-     3. "Backup" dir -- DOC/Backups/<renamed filenames>
-
-     And between these three, there are various migration paths, most of which only consider 2 of the 3, which is why this helper is based on 2 locations and has a notion of "direction".
-     */
-    NSMutableArray* backupInfo = [NSMutableArray arrayWithCapacity:3];
-
-    NSString* original;
-    NSString* backup;
-    CDVBackupInfo* backupItem;
-
-    // ////////// LOCALSTORAGE
-
-    original = [targetDir stringByAppendingPathComponent:targetDirNests ? @"WebKit/LocalStorage/file__0.localstorage":@"file__0.localstorage"];
-    backup = [backupDir stringByAppendingPathComponent:(backupDirNests ? @"WebKit/LocalStorage" : @"")];
-    backup = [backup stringByAppendingPathComponent:(rename ? @"localstorage.appdata.db" : @"file__0.localstorage")];
-
-    backupItem = [[CDVBackupInfo alloc] init];
-    backupItem.backup = backup;
-    backupItem.original = original;
-    backupItem.label = @"localStorage database";
-
-    [backupInfo addObject:backupItem];
-
-    // ////////// WEBSQL MAIN DB
-
-    original = [targetDir stringByAppendingPathComponent:targetDirNests ? @"WebKit/LocalStorage/Databases.db":@"Databases.db"];
-    backup = [backupDir stringByAppendingPathComponent:(backupDirNests ? @"WebKit/LocalStorage" : @"")];
-    backup = [backup stringByAppendingPathComponent:(rename ? @"websqlmain.appdata.db" : @"Databases.db")];
-
-    backupItem = [[CDVBackupInfo alloc] init];
-    backupItem.backup = backup;
-    backupItem.original = original;
-    backupItem.label = @"websql main database";
-
-    [backupInfo addObject:backupItem];
-
-    // ////////// WEBSQL DATABASES
-
-    original = [targetDir stringByAppendingPathComponent:targetDirNests ? @"WebKit/LocalStorage/file__0":@"file__0"];
-    backup = [backupDir stringByAppendingPathComponent:(backupDirNests ? @"WebKit/LocalStorage" : @"")];
-    backup = [backup stringByAppendingPathComponent:(rename ? @"websqldbs.appdata.db" : @"file__0")];
-
-    backupItem = [[CDVBackupInfo alloc] init];
-    backupItem.backup = backup;
-    backupItem.original = original;
-    backupItem.label = @"websql databases";
-
-    [backupInfo addObject:backupItem];
-
-    return backupInfo;
-}
-
-+ (NSMutableArray*)createBackupInfoWithCloudBackup:(BOOL)cloudBackup
-{
-    // create backup info from backup folder to caches folder
-    NSString* appLibraryFolder = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0];
-    NSString* appDocumentsFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
-    NSString* cacheFolder = [appLibraryFolder stringByAppendingPathComponent:@"Caches"];
-    NSString* backupsFolder = [appDocumentsFolder stringByAppendingPathComponent:@"Backups"];
-
-    // create the backups folder, if needed
-    [[NSFileManager defaultManager] createDirectoryAtPath:backupsFolder withIntermediateDirectories:YES attributes:nil error:nil];
-
-    [self addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:backupsFolder] skip:!cloudBackup];
-
-    return [self createBackupInfoWithTargetDir:cacheFolder backupDir:backupsFolder targetDirNests:NO backupDirNests:NO rename:YES];
-}
-
-+ (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL*)URL skip:(BOOL)skip
-{
-    NSError* error = nil;
-    BOOL success = [URL setResourceValue:[NSNumber numberWithBool:skip] forKey:NSURLIsExcludedFromBackupKey error:&error];
-
-    if (!success) {
-        NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
-    }
-    return success;
-}
-
-+ (BOOL)copyFrom:(NSString*)src to:(NSString*)dest error:(NSError* __autoreleasing*)error
-{
-    NSFileManager* fileManager = [NSFileManager defaultManager];
-
-    if (![fileManager fileExistsAtPath:src]) {
-        NSString* errorString = [NSString stringWithFormat:@"%@ file does not exist.", src];
-        if (error != NULL) {
-            (*error) = [NSError errorWithDomain:kCDVLocalStorageErrorDomain
-                                           code:kCDVLocalStorageFileOperationError
-                                       userInfo:[NSDictionary dictionaryWithObject:errorString
-                                                                            forKey:NSLocalizedDescriptionKey]];
-        }
-        return NO;
-    }
-
-    // generate unique filepath in temp directory
-    CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault);
-    CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef);
-    NSString* tempBackup = [[NSTemporaryDirectory() stringByAppendingPathComponent:(__bridge NSString*)uuidString] stringByAppendingPathExtension:@"bak"];
-    CFRelease(uuidString);
-    CFRelease(uuidRef);
-
-    BOOL destExists = [fileManager fileExistsAtPath:dest];
-
-    // backup the dest
-    if (destExists && ![fileManager copyItemAtPath:dest toPath:tempBackup error:error]) {
-        return NO;
-    }
-
-    // remove the dest
-    if (destExists && ![fileManager removeItemAtPath:dest error:error]) {
-        return NO;
-    }
-
-    // create path to dest
-    if (!destExists && ![fileManager createDirectoryAtPath:[dest stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:error]) {
-        return NO;
-    }
-
-    // copy src to dest
-    if ([fileManager copyItemAtPath:src toPath:dest error:error]) {
-        // success - cleanup - delete the backup to the dest
-        if ([fileManager fileExistsAtPath:tempBackup]) {
-            [fileManager removeItemAtPath:tempBackup error:error];
-        }
-        return YES;
-    } else {
-        // failure - we restore the temp backup file to dest
-        [fileManager copyItemAtPath:tempBackup toPath:dest error:error];
-        // cleanup - delete the backup to the dest
-        if ([fileManager fileExistsAtPath:tempBackup]) {
-            [fileManager removeItemAtPath:tempBackup error:error];
-        }
-        return NO;
-    }
-}
-
-- (BOOL)shouldBackup
-{
-    for (CDVBackupInfo* info in self.backupInfo) {
-        if ([info shouldBackup]) {
-            return YES;
-        }
-    }
-
-    return NO;
-}
-
-- (BOOL)shouldRestore
-{
-    for (CDVBackupInfo* info in self.backupInfo) {
-        if ([info shouldRestore]) {
-            return YES;
-        }
-    }
-
-    return NO;
-}
-
-/* copy from webkitDbLocation to persistentDbLocation */
-- (void)backup:(CDVInvokedUrlCommand*)command
-{
-    NSString* callbackId = command.callbackId;
-
-    NSError* __autoreleasing error = nil;
-    CDVPluginResult* result = nil;
-    NSString* message = nil;
-
-    for (CDVBackupInfo* info in self.backupInfo) {
-        if ([info shouldBackup]) {
-            [[self class] copyFrom:info.original to:info.backup error:&error];
-
-            if (callbackId) {
-                if (error == nil) {
-                    message = [NSString stringWithFormat:@"Backed up: %@", info.label];
-                    NSLog(@"%@", message);
-
-                    result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];
-                    [self.commandDelegate sendPluginResult:result callbackId:callbackId];
-                } else {
-                    message = [NSString stringWithFormat:@"Error in CDVLocalStorage (%@) backup: %@", info.label, [error localizedDescription]];
-                    NSLog(@"%@", message);
-
-                    result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:message];
-                    [self.commandDelegate sendPluginResult:result callbackId:callbackId];
-                }
-            }
-        }
-    }
-}
-
-/* copy from persistentDbLocation to webkitDbLocation */
-- (void)restore:(CDVInvokedUrlCommand*)command
-{
-    NSError* __autoreleasing error = nil;
-    CDVPluginResult* result = nil;
-    NSString* message = nil;
-
-    for (CDVBackupInfo* info in self.backupInfo) {
-        if ([info shouldRestore]) {
-            [[self class] copyFrom:info.backup to:info.original error:&error];
-
-            if (error == nil) {
-                message = [NSString stringWithFormat:@"Restored: %@", info.label];
-                NSLog(@"%@", message);
-
-                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];
-                [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
-            } else {
-                message = [NSString stringWithFormat:@"Error in CDVLocalStorage (%@) restore: %@", info.label, [error localizedDescription]];
-                NSLog(@"%@", message);
-
-                result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:message];
-                [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
-            }
-        }
-    }
-}
-
-+ (void)__fixupDatabaseLocationsWithBackupType:(NSString*)backupType
-{
-    [self __verifyAndFixDatabaseLocations];
-    [self __restoreLegacyDatabaseLocationsWithBackupType:backupType];
-}
-
-+ (void)__verifyAndFixDatabaseLocations
-{
-    NSBundle* mainBundle = [NSBundle mainBundle];
-    NSString* bundlePath = [[mainBundle bundlePath] stringByDeletingLastPathComponent];
-    NSString* bundleIdentifier = [[mainBundle infoDictionary] objectForKey:@"CFBundleIdentifier"];
-    NSString* appPlistPath = [bundlePath stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Preferences/%@.plist", bundleIdentifier]];
-
-    NSMutableDictionary* appPlistDict = [NSMutableDictionary dictionaryWithContentsOfFile:appPlistPath];
-    BOOL modified = [[self class] __verifyAndFixDatabaseLocationsWithAppPlistDict:appPlistDict
-                                                                       bundlePath:bundlePath
-                                                                      fileManager:[NSFileManager defaultManager]];
-
-    if (modified) {
-        BOOL ok = [appPlistDict writeToFile:appPlistPath atomically:YES];
-        [[NSUserDefaults standardUserDefaults] synchronize];
-        NSLog(@"Fix applied for database locations?: %@", ok ? @"YES" : @"NO");
-    }
-}
-
-+ (BOOL)__verifyAndFixDatabaseLocationsWithAppPlistDict:(NSMutableDictionary*)appPlistDict
-                                             bundlePath:(NSString*)bundlePath
-                                            fileManager:(NSFileManager*)fileManager
-{
-    NSString* libraryCaches = @"Library/Caches";
-    NSString* libraryWebKit = @"Library/WebKit";
-
-    NSArray* keysToCheck = [NSArray arrayWithObjects:
-        @"WebKitLocalStorageDatabasePathPreferenceKey",
-        @"WebDatabaseDirectory",
-        nil];
-
-    BOOL dirty = NO;
-
-    for (NSString* key in keysToCheck) {
-        NSString* value = [appPlistDict objectForKey:key];
-        // verify key exists, and path is in app bundle, if not - fix
-        if ((value != nil) && ![value hasPrefix:bundlePath]) {
-            // the pathSuffix to use may be wrong - OTA upgrades from < 5.1 to 5.1 do keep the old path Library/WebKit,
-            // while Xcode synced ones do change the storage location to Library/Caches
-            NSString* newBundlePath = [bundlePath stringByAppendingPathComponent:libraryCaches];
-            if (![fileManager fileExistsAtPath:newBundlePath]) {
-                newBundlePath = [bundlePath stringByAppendingPathComponent:libraryWebKit];
-            }
-            [appPlistDict setValue:newBundlePath forKey:key];
-            dirty = YES;
-        }
-    }
-
-    return dirty;
-}
-
-+ (void)__restoreLegacyDatabaseLocationsWithBackupType:(NSString*)backupType
-{
-    // on iOS 6, if you toggle between cloud/local backup, you must move database locations.  Default upgrade from iOS5.1 to iOS6 is like a toggle from local to cloud.
-    NSString* appLibraryFolder = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0];
-    NSString* appDocumentsFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
-
-    NSMutableArray* backupInfo = [NSMutableArray arrayWithCapacity:0];
-
-    if ([backupType isEqualToString:@"cloud"]) {
-#ifdef DEBUG
-            NSLog(@"\n\nStarted backup to iCloud! Please be careful."
-                "\nYour application might be rejected by Apple if you store too much data."
-                "\nFor more information please read \"iOS Data Storage Guidelines\" at:"
-                "\nhttps://developer.apple.com/icloud/documentation/data-storage/"
-                "\nTo disable web storage backup to iCloud, set the BackupWebStorage preference to \"local\" in the Cordova config.xml file\n\n");
-#endif
-        // We would like to restore old backups/caches databases to the new destination (nested in lib folder)
-        [backupInfo addObjectsFromArray:[self createBackupInfoWithTargetDir:appLibraryFolder backupDir:[appDocumentsFolder stringByAppendingPathComponent:@"Backups"] targetDirNests:YES backupDirNests:NO rename:YES]];
-        [backupInfo addObjectsFromArray:[self createBackupInfoWithTargetDir:appLibraryFolder backupDir:[appLibraryFolder stringByAppendingPathComponent:@"Caches"] targetDirNests:YES backupDirNests:NO rename:NO]];
-    } else {
-        // For ios6 local backups we also want to restore from Backups dir -- but we don't need to do that here, since the plugin will do that itself.
-        [backupInfo addObjectsFromArray:[self createBackupInfoWithTargetDir:[appLibraryFolder stringByAppendingPathComponent:@"Caches"] backupDir:appLibraryFolder targetDirNests:NO backupDirNests:YES rename:NO]];
-    }
-
-    NSFileManager* manager = [NSFileManager defaultManager];
-
-    for (CDVBackupInfo* info in backupInfo) {
-        if ([manager fileExistsAtPath:info.backup]) {
-            if ([info shouldRestore]) {
-                NSLog(@"Restoring old webstorage backup. From: '%@' To: '%@'.", info.backup, info.original);
-                [self copyFrom:info.backup to:info.original error:nil];
-            }
-            NSLog(@"Removing old webstorage backup: '%@'.", info.backup);
-            [manager removeItemAtPath:info.backup error:nil];
-        }
-    }
-
-    [[NSUserDefaults standardUserDefaults] setBool:[backupType isEqualToString:@"cloud"] forKey:@"WebKitStoreWebDataForBackup"];
-}
-
-#pragma mark -
-#pragma mark Notification handlers
-
-- (void)onResignActive
-{
-    UIDevice* device = [UIDevice currentDevice];
-    NSNumber* exitsOnSuspend = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIApplicationExitsOnSuspend"];
-
-    BOOL isMultitaskingSupported = [device respondsToSelector:@selector(isMultitaskingSupported)] && [device isMultitaskingSupported];
-
-    if (exitsOnSuspend == nil) { // if it's missing, it should be NO (i.e. multi-tasking on by default)
-        exitsOnSuspend = [NSNumber numberWithBool:NO];
-    }
-
-    if (exitsOnSuspend) {
-        [self backup:nil];
-    } else if (isMultitaskingSupported) {
-        __block UIBackgroundTaskIdentifier backgroundTaskID = UIBackgroundTaskInvalid;
-
-        backgroundTaskID = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
-                [[UIApplication sharedApplication] endBackgroundTask:backgroundTaskID];
-                backgroundTaskID = UIBackgroundTaskInvalid;
-                NSLog(@"Background task to backup WebSQL/LocalStorage expired.");
-            }];
-        CDVLocalStorage __weak* weakSelf = self;
-        [self.commandDelegate runInBackground:^{
-            [weakSelf backup:nil];
-
-            [[UIApplication sharedApplication] endBackgroundTask:backgroundTaskID];
-            backgroundTaskID = UIBackgroundTaskInvalid;
-        }];
-    }
-}
-
-- (void)onAppTerminate
-{
-    [self onResignActive];
-}
-
-- (void)onReset
-{
-    [self restore:nil];
-}
-
-@end
-
-#pragma mark -
-#pragma mark CDVBackupInfo implementation
-
-@implementation CDVBackupInfo
-
-@synthesize original, backup, label;
-
-- (BOOL)file:(NSString*)aPath isNewerThanFile:(NSString*)bPath
-{
-    NSFileManager* fileManager = [NSFileManager defaultManager];
-    NSError* __autoreleasing error = nil;
-
-    NSDictionary* aPathAttribs = [fileManager attributesOfItemAtPath:aPath error:&error];
-    NSDictionary* bPathAttribs = [fileManager attributesOfItemAtPath:bPath error:&error];
-
-    NSDate* aPathModDate = [aPathAttribs objectForKey:NSFileModificationDate];
-    NSDate* bPathModDate = [bPathAttribs objectForKey:NSFileModificationDate];
-
-    if ((nil == aPathModDate) && (nil == bPathModDate)) {
-        return NO;
-    }
-
-    return [aPathModDate compare:bPathModDate] == NSOrderedDescending || bPathModDate == nil;
-}
-
-- (BOOL)item:(NSString*)aPath isNewerThanItem:(NSString*)bPath
-{
-    NSFileManager* fileManager = [NSFileManager defaultManager];
-
-    BOOL aPathIsDir = NO, bPathIsDir = NO;
-    BOOL aPathExists = [fileManager fileExistsAtPath:aPath isDirectory:&aPathIsDir];
-
-    [fileManager fileExistsAtPath:bPath isDirectory:&bPathIsDir];
-
-    if (!aPathExists) {
-        return NO;
-    }
-
-    if (!(aPathIsDir && bPathIsDir)) { // just a file
-        return [self file:aPath isNewerThanFile:bPath];
-    }
-
-    // essentially we want rsync here, but have to settle for our poor man's implementation
-    // we get the files in aPath, and see if it is newer than the file in bPath
-    // (it is newer if it doesn't exist in bPath) if we encounter the FIRST file that is newer,
-    // we return YES
-    NSDirectoryEnumerator* directoryEnumerator = [fileManager enumeratorAtPath:aPath];
-    NSString* path;
-
-    while ((path = [directoryEnumerator nextObject])) {
-        NSString* aPathFile = [aPath stringByAppendingPathComponent:path];
-        NSString* bPathFile = [bPath stringByAppendingPathComponent:path];
-
-        BOOL isNewer = [self file:aPathFile isNewerThanFile:bPathFile];
-        if (isNewer) {
-            return YES;
-        }
-    }
-
-    return NO;
-}
-
-- (BOOL)shouldBackup
-{
-    return [self item:self.original isNewerThanItem:self.backup];
-}
-
-- (BOOL)shouldRestore
-{
-    return [self item:self.backup isNewerThanItem:self.original];
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d58fa4aa/CordovaLib/Classes/CDVPlugin+Private.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin+Private.h b/CordovaLib/Classes/CDVPlugin+Private.h
deleted file mode 100644
index f88638c..0000000
--- a/CordovaLib/Classes/CDVPlugin+Private.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-@interface CDVPlugin (Private)
-
-- (instancetype)initWithWebViewEngine:(id <CDVWebViewEngineProtocol>)theWebViewEngine;
-
-@end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[14/50] [abbrv] ios commit: Delete implementation of base64EncodedString since header declaration is already removed (renamed to cdv_base64EncodedString)

Posted by ia...@apache.org.
Delete implementation of base64EncodedString since header declaration is already removed (renamed to cdv_base64EncodedString)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/c7fcf303
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/c7fcf303
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/c7fcf303

Branch: refs/heads/unplug-whitelist
Commit: c7fcf3030642cf22476d62f31b2e95622acfba55
Parents: 5777308
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Mar 16 09:38:43 2015 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Mar 16 09:38:43 2015 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/NSData+Base64.m | 10 ----------
 1 file changed, 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c7fcf303/CordovaLib/Classes/NSData+Base64.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSData+Base64.m b/CordovaLib/Classes/NSData+Base64.m
index 634dff6..43560f0 100644
--- a/CordovaLib/Classes/NSData+Base64.m
+++ b/CordovaLib/Classes/NSData+Base64.m
@@ -295,14 +295,4 @@ char *CDVNewBase64Encode(
     return result;
 }
 
-+ (NSData*)dataFromBase64String:(NSString*)aString
-{
-    return [self cdv_dataFromBase64String:aString];
-}
-
-- (NSString*)base64EncodedString
-{
-    return [self cdv_base64EncodedString];
-}
-
 @end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org