You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2020/02/10 04:32:56 UTC

[cordova-ios] branch master updated: refactor: drop uiwebview & add wkwebview (#773)

This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git


The following commit(s) were added to refs/heads/master by this push:
     new 240a177  refactor: drop uiwebview & add wkwebview (#773)
240a177 is described below

commit 240a177d9dd5966768c20ab14920b708af3baa0b
Author: エリス <er...@users.noreply.github.com>
AuthorDate: Mon Feb 10 13:32:46 2020 +0900

    refactor: drop uiwebview & add wkwebview (#773)
    
    * refactor: drop uiwebview & default to wkwebview
    * refactor: remove CDVLocalStorage
    * refactor: set CDVWebViewNavigationTypeOther as -1
    * refactor: udpated & fixed cordova.js
    * refactor: force WK_WEB_VIEW_ONLY flag to true
    
    Note:
    * The WK_WEB_VIEW_ONLY flag is hardcoded to true. This is to ensure that the IAB@3.2.x plugin is forced to use WKWebView as this release does not support UIWebView.
    * The WK_WEB_VIEW_ONLY flag is kept only as part of a transitioning period. The flag will be removed in a later release.
---
 .../CDVIntentAndNavigationFilter.h                 |   4 -
 .../CDVIntentAndNavigationFilter.m                 |  19 +-
 .../Plugins/CDVLocalStorage/CDVLocalStorage.h      |  50 ---
 .../Plugins/CDVLocalStorage/CDVLocalStorage.m      | 493 --------------------
 .../CDVUIWebViewEngine/CDVUIWebViewDelegate.m      | 408 -----------------
 .../CDVUIWebViewEngine/CDVUIWebViewEngine.m        | 206 ---------
 .../CDVUIWebViewNavigationDelegate.m               | 157 -------
 .../CDVWebViewEngine.h}                            |  14 +-
 .../Plugins/CDVWebViewEngine/CDVWebViewEngine.m    | 487 ++++++++++++++++++++
 .../CDVWebViewProcessPoolFactory.h}                |  20 +-
 .../CDVWebViewProcessPoolFactory.m}                |  48 +-
 .../CDVWebViewUIDelegate.h}                        |  11 +-
 .../CDVWebViewEngine/CDVWebViewUIDelegate.m        | 123 +++++
 CordovaLib/Classes/Public/CDVAppDelegate.m         |  17 -
 CordovaLib/Classes/Public/CDVCommandDelegate.h     |   2 +-
 CordovaLib/Classes/Public/CDVCommandDelegateImpl.m |   2 +-
 CordovaLib/Classes/Public/CDVUserAgentUtil.m       |  12 +-
 CordovaLib/Classes/Public/CDVViewController.m      |  19 +-
 .../Classes/Public/CDVWebViewEngineProtocol.h      |   1 -
 CordovaLib/Cordova/Cordova.h                       |   1 +
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj    | 106 ++---
 CordovaLib/cordova.js                              | 220 +++------
 bin/lib/create.js                                  |  13 -
 .../__PROJECT_NAME__/Classes/MainViewController.m  |   5 -
 .../project/__TEMP__.xcodeproj/project.pbxproj     |   4 +-
 bin/templates/project/www/index.html               |   2 +-
 bin/templates/scripts/cordova/lib/prepare.js       |  20 +-
 cordova-js-src/exec.js                             | 132 +-----
 cordova-js-src/platform.js                         |   4 +
 .../{platform.js => plugin/ios/wkwebkit.js}        |  13 +-
 tests/CordovaLibTests/CDVUserAgentTest.m           |  77 ----
 tests/CordovaLibTests/CDVWebViewDelegateTests.m    |  41 +-
 tests/CordovaLibTests/CDVWebViewEngineTest.m       | 227 ++++++++++
 tests/CordovaLibTests/CDVWebViewTest.h             |  24 +-
 tests/CordovaLibTests/CDVWebViewTest.m             |   5 -
 tests/CordovaLibTests/CDVWhitelistTests.m          |  26 --
 tests/CordovaLibTests/CordovaLibApp/AppDelegate.m  |   2 -
 .../CordovaLibTests.xcodeproj/project.pbxproj      |  36 +-
 .../CordovaLib.xcodeproj/project.pbxproj           | 498 +++++++++++----------
 .../SampleApp/Classes/MainViewController.m         |   5 -
 40 files changed, 1276 insertions(+), 2278 deletions(-)

diff --git a/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h
index a038dbd..14c6a66 100644
--- a/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h
+++ b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h
@@ -20,11 +20,7 @@
 #import <Cordova/CDVPlugin.h>
 #import <Cordova/CDVWhitelist.h>
 
-#if WK_WEB_VIEW_ONLY
 #define CDVWebViewNavigationType int
-#else
-#define CDVWebViewNavigationType UIWebViewNavigationType
-#endif
 
 typedef NS_ENUM(NSInteger, CDVIntentAndNavigationFilterValue) {
     CDVIntentAndNavigationFilterValueIntentAllowed,
diff --git a/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m
index b656cd9..f7f9422 100644
--- a/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m
+++ b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m
@@ -95,21 +95,15 @@
     return [[self class] filterUrl:url intentsWhitelist:self.allowIntentsWhitelist navigationsWhitelist:self.allowNavigationsWhitelist];
 }
 
-#if WK_WEB_VIEW_ONLY
 #define CDVWebViewNavigationTypeLinkClicked 0
-#define CDVWebViewNavigationTypeOther 5
-#else
-#define CDVWebViewNavigationTypeLinkClicked UIWebViewNavigationTypeLinkClicked
-#define CDVWebViewNavigationTypeOther UIWebViewNavigationTypeOther
-#endif
+#define CDVWebViewNavigationTypeLinkOther -1
 
 + (BOOL)shouldOpenURLRequest:(NSURLRequest*)request navigationType:(CDVWebViewNavigationType)navigationType
 {
-    return (CDVWebViewNavigationTypeLinkClicked == navigationType ||
-        (CDVWebViewNavigationTypeOther == navigationType &&
-         [[request.mainDocumentURL absoluteString] isEqualToString:[request.URL absoluteString]]
-         )
-        );
+    return (
+        navigationType == CDVWebViewNavigationTypeLinkClicked ||
+        navigationType == CDVWebViewNavigationTypeLinkOther
+    );
 }
 
 + (BOOL)shouldOverrideLoadWithRequest:(NSURLRequest*)request navigationType:(CDVWebViewNavigationType)navigationType filterValue:(CDVIntentAndNavigationFilterValue)filterValue
@@ -123,8 +117,7 @@
         case CDVIntentAndNavigationFilterValueNavigationAllowed:
             return YES;
         case CDVIntentAndNavigationFilterValueIntentAllowed:
-            // only allow-intent if it's a UIWebViewNavigationTypeLinkClicked (anchor tag) OR
-            // it's a UIWebViewNavigationTypeOther, and it's an internal link
+            // only allow-intent if it's a CDVWebViewNavigationTypeLinkClicked (anchor tag) or CDVWebViewNavigationTypeOther and it's an internal link
             if ([[self class] shouldOpenURLRequest:request navigationType:navigationType]){
                 [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
             }
diff --git a/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h b/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h
deleted file mode 100644
index e93675e..0000000
--- a/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/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 <Cordova/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
diff --git a/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m b/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m
deleted file mode 100644
index 25c4853..0000000
--- a/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m
+++ /dev/null
@@ -1,493 +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 <Cordova/CDV.h>
-
-@interface CDVLocalStorage ()
-
-@property (nonatomic, readwrite, strong) NSMutableArray* backupInfo;  // array of CDVBackupInfo objects
-#if !WK_WEB_VIEW_ONLY
-@property (nonatomic, readwrite, weak) id <UIWebViewDelegate> webviewDelegate;
-#endif
-
-@end
-
-@implementation CDVLocalStorage
-
-#if WK_WEB_VIEW_ONLY
-@synthesize backupInfo;
-#else
-@synthesize backupInfo, webviewDelegate;
-#endif
-
-- (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
diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m
deleted file mode 100644
index ddef8be..0000000
--- a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m
+++ /dev/null
@@ -1,408 +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.
-//
-
-#if !WK_WEB_VIEW_ONLY
-
-#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];
-    NSArray* allowedSchemes = [NSArray arrayWithObjects:@"mailto",@"tel",@"blob",@"sms",@"data", nil];
-    if([allowedSchemes containsObject:scheme]) {
-        return YES;
-    }
-    else {
-        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:
-                    {
-                        NSString* description = [NSString stringWithFormat:@"CDVWebViewDelegate: Navigation started when state=%ld", (long)_state];
-                        NSLog(@"%@", description);
-                        _loadCount = 0;
-                        _state = STATE_WAITING_FOR_LOAD_START;
-
-                        NSDictionary* errorDictionary = @{NSLocalizedDescriptionKey : description};
-                        NSError* error = [[NSError alloc] initWithDomain:@"CDVUIWebViewDelegate" code:1 userInfo:errorDictionary];
-                        [self 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:
-            // fix call loadRequest multiple times just callback webViewDidFinishLoad once time in iOS 12
-            if (@available(iOS 12.0, *)) {
-                fireCallback = YES;
-            } else {
-                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
-
-#endif
diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m
deleted file mode 100644
index e5767b5..0000000
--- a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m
+++ /dev/null
@@ -1,206 +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.
- */
-
-#if !WK_WEB_VIEW_ONLY
-
-#import "CDVUIWebViewEngine.h"
-#import "CDVUIWebViewDelegate.h"
-#import "CDVUIWebViewNavigationDelegate.h"
-#import "NSDictionary+CordovaPreferences.h"
-
-#import <objc/message.h>
-
-@interface CDVUIWebViewEngine ()
-
-@property (nonatomic, strong, readwrite) UIView* engineWebView;
-@property (nonatomic, strong, readwrite) id <UIWebViewDelegate> uiWebViewDelegate;
-@property (nonatomic, strong, readwrite) CDVUIWebViewNavigationDelegate* navWebViewDelegate;
-
-@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;
-    } else {
-        self.navWebViewDelegate = [[CDVUIWebViewNavigationDelegate alloc] initWithEnginePlugin:self];
-        self.uiWebViewDelegate = [[CDVUIWebViewDelegate alloc] initWithDelegate:self.navWebViewDelegate];
-        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];
-}
-
-- (BOOL) canLoadRequest:(NSURLRequest*)request
-{
-    return (request != nil);
-}
-
-- (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 ([uiWebView 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>)uiWebViewDelegate];
-        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;
-}
-
-- (UIView*)webView
-{
-    return self.engineWebView;
-}
-
-@end
-
-#endif
diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m b/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m
deleted file mode 100644
index a918e2d..0000000
--- a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m
+++ /dev/null
@@ -1,157 +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.
- */
-
-#if !WK_WEB_VIEW_ONLY
-
-#import "CDVUIWebViewNavigationDelegate.h"
-#import <Cordova/CDVViewController.h>
-#import <Cordova/CDVCommandDelegateImpl.h>
-#import <Cordova/CDVUserAgentUtil.h>
-#import <objc/message.h>
-
-@implementation CDVUIWebViewNavigationDelegate
-
-- (instancetype)initWithEnginePlugin:(CDVPlugin*)theEnginePlugin
-{
-    self = [super init];
-    if (self) {
-        self.enginePlugin = theEnginePlugin;
-    }
-
-    return self;
-}
-
-/**
- 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.");
-    CDVViewController* vc = (CDVViewController*)self.enginePlugin.viewController;
-
-    [vc.commandQueue resetRequestId];
-    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginResetNotification object:self.enginePlugin.webView]];
-}
-
-/**
- Called when the webview finishes loading.  This stops the activity view.
- */
-- (void)webViewDidFinishLoad:(UIWebView*)theWebView
-{
-    NSLog(@"Finished load of: %@", theWebView.request.URL);
-    CDVViewController* vc = (CDVViewController*)self.enginePlugin.viewController;
-
-    // It's safe to release the lock even if this is just a sub-frame that's finished loading.
-    [CDVUserAgentUtil releaseLock:vc.userAgentLockToken];
-
-    /*
-     * Hide the Top Activity THROBBER in the Battery Bar
-     */
-    [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
-
-    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:self.enginePlugin.webView]];
-}
-
-- (void)webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error
-{
-    CDVViewController* vc = (CDVViewController*)self.enginePlugin.viewController;
-
-    [CDVUserAgentUtil releaseLock:vc.userAgentLockToken];
-
-    NSString* message = [NSString stringWithFormat:@"Failed to load webpage with error: %@", [error localizedDescription]];
-    NSLog(@"%@", message);
-
-    NSURL* errorUrl = vc.errorURL;
-    if (errorUrl) {
-        errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [message stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLPathAllowedCharacterSet]] relativeToURL:errorUrl];
-        NSLog(@"%@", [errorUrl absoluteString]);
-        if(error.code != NSURLErrorCancelled) {
-            [theWebView loadRequest:[NSURLRequest requestWithURL:errorUrl]];
-        }
-    }
-}
-
-- (BOOL)defaultResourcePolicyForURL:(NSURL*)url
-{
-    /*
-     * If a URL is being loaded that's a file url, just load it internally
-     */
-    if ([url isFileURL]) {
-        return YES;
-    }
-
-    return NO;
-}
-
-- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
-{
-    NSURL* url = [request URL];
-    CDVViewController* vc = (CDVViewController*)self.enginePlugin.viewController;
-
-    /*
-     * 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"]) {
-        [vc.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.
-        [vc.commandQueue executePending];
-        return NO;
-    }
-
-    /*
-     * Give plugins the chance to handle the url
-     */
-    BOOL anyPluginsResponded = NO;
-    BOOL shouldAllowRequest = NO;
-
-    for (NSString* pluginName in vc.pluginObjects) {
-        CDVPlugin* plugin = [vc.pluginObjects objectForKey:pluginName];
-        SEL selector = NSSelectorFromString(@"shouldOverrideLoadWithRequest:navigationType:");
-        if ([plugin respondsToSelector:selector]) {
-            anyPluginsResponded = YES;
-            shouldAllowRequest = (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, request, navigationType));
-            if (!shouldAllowRequest) {
-                break;
-            }
-        }
-    }
-
-    if (anyPluginsResponded) {
-        return shouldAllowRequest;
-    }
-
-    /*
-     * Handle all other types of urls (tel:, sms:), and requests to load a url in the main webview.
-     */
-    BOOL shouldAllowNavigation = [self defaultResourcePolicyForURL:url];
-    if (shouldAllowNavigation) {
-        return YES;
-    } else {
-        [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
-    }
-
-    return NO;
-}
-
-@end
-
-#endif
diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.h
similarity index 71%
copy from CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h
copy to CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.h
index 9b9b31f..47e26d1 100644
--- a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h
+++ b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.h
@@ -17,17 +17,13 @@
  under the License.
  */
 
-#if !WK_WEB_VIEW_ONLY
+#import <WebKit/WebKit.h>
+#import <Cordova/CDV.h>
 
-#import <UIKit/UIKit.h>
-#import "CDVUIWebViewEngine.h"
+@interface CDVWebViewEngine : CDVPlugin <CDVWebViewEngineProtocol, WKScriptMessageHandler, WKNavigationDelegate>
 
-@interface CDVUIWebViewNavigationDelegate : NSObject <UIWebViewDelegate>
+@property (nonatomic, strong, readonly) id <WKUIDelegate> uiDelegate;
 
-@property (nonatomic, weak) CDVPlugin* enginePlugin;
-
-- (instancetype)initWithEnginePlugin:(CDVPlugin*)enginePlugin;
+- (void)allowsBackForwardNavigationGestures:(CDVInvokedUrlCommand*)command;
 
 @end
-
-#endif
diff --git a/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m
new file mode 100644
index 0000000..8e2ec6f
--- /dev/null
+++ b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.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 "CDVWebViewEngine.h"
+#import "CDVWebViewUIDelegate.h"
+#import "CDVWebViewProcessPoolFactory.h"
+#import <Cordova/NSDictionary+CordovaPreferences.h>
+
+#import <objc/message.h>
+
+#define CDV_BRIDGE_NAME @"cordova"
+#define CDV_WKWEBVIEW_FILE_URL_LOAD_SELECTOR @"loadFileURL:allowingReadAccessToURL:"
+
+@interface CDVWebViewWeakScriptMessageHandler : NSObject <WKScriptMessageHandler>
+
+@property (nonatomic, weak, readonly) id<WKScriptMessageHandler>scriptMessageHandler;
+
+- (instancetype)initWithScriptMessageHandler:(id<WKScriptMessageHandler>)scriptMessageHandler;
+
+@end
+
+
+@interface CDVWebViewEngine ()
+
+@property (nonatomic, strong, readwrite) UIView* engineWebView;
+@property (nonatomic, strong, readwrite) id <WKUIDelegate> uiDelegate;
+@property (nonatomic, weak) id <WKScriptMessageHandler> weakScriptMessageHandler;
+
+@end
+
+// see forwardingTargetForSelector: selector comment for the reason for this pragma
+#pragma clang diagnostic ignored "-Wprotocol"
+
+@implementation CDVWebViewEngine
+
+@synthesize engineWebView = _engineWebView;
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super init];
+    if (self) {
+        if (NSClassFromString(@"WKWebView") == nil) {
+            return nil;
+        }
+
+        self.engineWebView = [[WKWebView alloc] initWithFrame:frame];
+    }
+
+    return self;
+}
+
+- (WKWebViewConfiguration*) createConfigurationFromSettings:(NSDictionary*)settings
+{
+    WKWebViewConfiguration* configuration = [[WKWebViewConfiguration alloc] init];
+    configuration.processPool = [[CDVWebViewProcessPoolFactory sharedFactory] sharedProcessPool];
+    if (settings == nil) {
+        return configuration;
+    }
+
+    configuration.allowsInlineMediaPlayback = [settings cordovaBoolSettingForKey:@"AllowInlineMediaPlayback" defaultValue:NO];
+    configuration.mediaPlaybackRequiresUserAction = [settings cordovaBoolSettingForKey:@"MediaPlaybackRequiresUserAction" defaultValue:YES];
+    configuration.suppressesIncrementalRendering = [settings cordovaBoolSettingForKey:@"SuppressesIncrementalRendering" defaultValue:NO];
+    configuration.mediaPlaybackAllowsAirPlay = [settings cordovaBoolSettingForKey:@"MediaPlaybackAllowsAirPlay" defaultValue:YES];
+    return configuration;
+}
+
+- (void)pluginInitialize
+{
+    // viewController would be available now. we attempt to set all possible delegates to it, by default
+    NSDictionary* settings = self.commandDelegate.settings;
+
+    self.uiDelegate = [[CDVWebViewUIDelegate alloc] initWithTitle:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]];
+
+    CDVWebViewWeakScriptMessageHandler *weakScriptMessageHandler = [[CDVWebViewWeakScriptMessageHandler alloc] initWithScriptMessageHandler:self];
+
+    WKUserContentController* userContentController = [[WKUserContentController alloc] init];
+    [userContentController addScriptMessageHandler:weakScriptMessageHandler name:CDV_BRIDGE_NAME];
+
+    WKWebViewConfiguration* configuration = [self createConfigurationFromSettings:settings];
+    configuration.userContentController = userContentController;
+
+    // re-create WKWebView, since we need to update configuration
+    WKWebView* wkWebView = [[WKWebView alloc] initWithFrame:self.engineWebView.frame configuration:configuration];
+    wkWebView.UIDelegate = self.uiDelegate;
+    self.engineWebView = wkWebView;
+
+    if (IsAtLeastiOSVersion(@"9.0") && [self.viewController isKindOfClass:[CDVViewController class]]) {
+        wkWebView.customUserAgent = ((CDVViewController*) self.viewController).userAgent;
+    }
+
+    if ([self.viewController conformsToProtocol:@protocol(WKUIDelegate)]) {
+        wkWebView.UIDelegate = (id <WKUIDelegate>)self.viewController;
+    }
+
+    if ([self.viewController conformsToProtocol:@protocol(WKNavigationDelegate)]) {
+        wkWebView.navigationDelegate = (id <WKNavigationDelegate>)self.viewController;
+    } else {
+        wkWebView.navigationDelegate = (id <WKNavigationDelegate>)self;
+    }
+
+    if ([self.viewController conformsToProtocol:@protocol(WKScriptMessageHandler)]) {
+        [wkWebView.configuration.userContentController addScriptMessageHandler:(id < WKScriptMessageHandler >)self.viewController name:CDV_BRIDGE_NAME];
+    }
+
+    [self updateSettings:settings];
+
+    // check if content thread has died on resume
+    NSLog(@"%@", @"CDVWebViewEngine will reload WKWebView if required on resume");
+    [[NSNotificationCenter defaultCenter]
+        addObserver:self
+           selector:@selector(onAppWillEnterForeground:)
+               name:UIApplicationWillEnterForegroundNotification object:nil];
+
+    NSLog(@"Using WKWebView");
+
+    [self addURLObserver];
+}
+
+- (void)onReset {
+    [self addURLObserver];
+}
+
+static void * KVOContext = &KVOContext;
+
+- (void)addURLObserver {
+    if(!IsAtLeastiOSVersion(@"9.0")){
+        [self.webView addObserver:self forKeyPath:@"URL" options:0 context:KVOContext];
+    }
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context
+{
+    if (context == KVOContext) {
+        if (object == [self webView] && [keyPath isEqualToString: @"URL"] && [object valueForKeyPath:keyPath] == nil){
+            NSLog(@"URL is nil. Reloading WKWebView");
+            [(WKWebView*)_engineWebView reload];
+        }
+    } else {
+        [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
+    }
+}
+
+- (void) onAppWillEnterForeground:(NSNotification*)notification {
+    if ([self shouldReloadWebView]) {
+        NSLog(@"%@", @"CDVWebViewEngine reloading!");
+        [(WKWebView*)_engineWebView reload];
+    }
+}
+
+- (BOOL)shouldReloadWebView
+{
+    WKWebView* wkWebView = (WKWebView*)_engineWebView;
+    return [self shouldReloadWebView:wkWebView.URL title:wkWebView.title];
+}
+
+- (BOOL)shouldReloadWebView:(NSURL*)location title:(NSString*)title
+{
+    BOOL title_is_nil = (title == nil);
+    BOOL location_is_blank = [[location absoluteString] isEqualToString:@"about:blank"];
+
+    BOOL reload = (title_is_nil || location_is_blank);
+
+#ifdef DEBUG
+    NSLog(@"%@", @"CDVWebViewEngine shouldReloadWebView::");
+    NSLog(@"CDVWebViewEngine shouldReloadWebView title: %@", title);
+    NSLog(@"CDVWebViewEngine shouldReloadWebView location: %@", [location absoluteString]);
+    NSLog(@"CDVWebViewEngine shouldReloadWebView reload: %u", reload);
+#endif
+
+    return reload;
+}
+
+
+- (id)loadRequest:(NSURLRequest*)request
+{
+    if ([self canLoadRequest:request]) { // can load, differentiate between file urls and other schemes
+        if (request.URL.fileURL) {
+            SEL wk_sel = NSSelectorFromString(CDV_WKWEBVIEW_FILE_URL_LOAD_SELECTOR);
+            NSURL* readAccessUrl = [request.URL URLByDeletingLastPathComponent];
+            return ((id (*)(id, SEL, id, id))objc_msgSend)(_engineWebView, wk_sel, request.URL, readAccessUrl);
+        } else {
+            return [(WKWebView*)_engineWebView loadRequest:request];
+        }
+    } else { // can't load, print out error
+        NSString* errorHtml = [NSString stringWithFormat:
+                               @"<!doctype html>"
+                               @"<title>Error</title>"
+                               @"<div style='font-size:2em'>"
+                               @"   <p>The WebView engine '%@' is unable to load the request: %@</p>"
+                               @"   <p>Most likely the cause of the error is that the loading of file urls is not supported in iOS %@.</p>"
+                               @"</div>",
+                               NSStringFromClass([self class]),
+                               [request.URL description],
+                               [[UIDevice currentDevice] systemVersion]
+                               ];
+        return [self loadHTMLString:errorHtml baseURL:nil];
+    }
+}
+
+- (id)loadHTMLString:(NSString*)string baseURL:(NSURL*)baseURL
+{
+    return [(WKWebView*)_engineWebView loadHTMLString:string baseURL:baseURL];
+}
+
+- (NSURL*) URL
+{
+    return [(WKWebView*)_engineWebView URL];
+}
+
+- (BOOL) canLoadRequest:(NSURLRequest*)request
+{
+    // See: https://issues.apache.org/jira/browse/CB-9636
+    SEL wk_sel = NSSelectorFromString(CDV_WKWEBVIEW_FILE_URL_LOAD_SELECTOR);
+
+    // if it's a file URL, check whether WKWebView has the selector (which is in iOS 9 and up only)
+    if (request.URL.fileURL) {
+        return [_engineWebView respondsToSelector:wk_sel];
+    } else {
+        return YES;
+    }
+}
+
+- (void)updateSettings:(NSDictionary*)settings
+{
+    WKWebView* wkWebView = (WKWebView*)_engineWebView;
+
+    wkWebView.configuration.preferences.minimumFontSize = [settings cordovaFloatSettingForKey:@"MinimumFontSize" defaultValue:0.0];
+
+    /*
+     wkWebView.configuration.preferences.javaScriptEnabled = [settings cordovaBoolSettingForKey:@"JavaScriptEnabled" default:YES];
+     wkWebView.configuration.preferences.javaScriptCanOpenWindowsAutomatically = [settings cordovaBoolSettingForKey:@"JavaScriptCanOpenWindowsAutomatically" default:NO];
+     */
+
+    // By default, DisallowOverscroll is false (thus bounce is allowed)
+    BOOL bounceAllowed = !([settings cordovaBoolSettingForKey:@"DisallowOverscroll" defaultValue:NO]);
+
+    // prevent webView from bouncing
+    if (!bounceAllowed) {
+        if ([wkWebView respondsToSelector:@selector(scrollView)]) {
+            ((UIScrollView*)[wkWebView scrollView]).bounces = NO;
+        } else {
+            for (id subview in wkWebView.subviews) {
+                if ([[subview class] isSubclassOfClass:[UIScrollView class]]) {
+                    ((UIScrollView*)subview).bounces = NO;
+                }
+            }
+        }
+    }
+
+    NSString* decelerationSetting = [settings cordovaSettingForKey:@"WKWebViewDecelerationSpeed"];
+
+    if (![@"fast" isEqualToString:decelerationSetting]) {
+        [wkWebView.scrollView setDecelerationRate:UIScrollViewDecelerationRateNormal];
+    } else {
+        [wkWebView.scrollView setDecelerationRate:UIScrollViewDecelerationRateFast];
+    }
+
+    wkWebView.allowsBackForwardNavigationGestures = [settings cordovaBoolSettingForKey:@"AllowBackForwardNavigationGestures" defaultValue:NO];
+    wkWebView.allowsLinkPreview = [settings cordovaBoolSettingForKey:@"Allow3DTouchLinkPreview" defaultValue:YES];
+}
+
+- (void)updateWithInfo:(NSDictionary*)info
+{
+    NSDictionary* scriptMessageHandlers = [info objectForKey:kCDVWebViewEngineScriptMessageHandlers];
+    NSDictionary* settings = [info objectForKey:kCDVWebViewEngineWebViewPreferences];
+    id navigationDelegate = [info objectForKey:kCDVWebViewEngineWKNavigationDelegate];
+    id uiDelegate = [info objectForKey:kCDVWebViewEngineWKUIDelegate];
+
+    WKWebView* wkWebView = (WKWebView*)_engineWebView;
+
+    if (scriptMessageHandlers && [scriptMessageHandlers isKindOfClass:[NSDictionary class]]) {
+        NSArray* allKeys = [scriptMessageHandlers allKeys];
+
+        for (NSString* key in allKeys) {
+            id object = [scriptMessageHandlers objectForKey:key];
+            if ([object conformsToProtocol:@protocol(WKScriptMessageHandler)]) {
+                [wkWebView.configuration.userContentController addScriptMessageHandler:object name:key];
+            }
+        }
+    }
+
+    if (navigationDelegate && [navigationDelegate conformsToProtocol:@protocol(WKNavigationDelegate)]) {
+        wkWebView.navigationDelegate = navigationDelegate;
+    }
+
+    if (uiDelegate && [uiDelegate conformsToProtocol:@protocol(WKUIDelegate)]) {
+        wkWebView.UIDelegate = uiDelegate;
+    }
+
+    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 implement the below:
+//     loadHTMLString:baseURL:
+//     loadRequest:
+- (id)forwardingTargetForSelector:(SEL)aSelector
+{
+    return _engineWebView;
+}
+
+- (UIView*)webView
+{
+    return self.engineWebView;
+}
+
+#pragma mark WKScriptMessageHandler implementation
+
+- (void)userContentController:(WKUserContentController*)userContentController didReceiveScriptMessage:(WKScriptMessage*)message
+{
+    if (![message.name isEqualToString:CDV_BRIDGE_NAME]) {
+        return;
+    }
+
+    CDVViewController* vc = (CDVViewController*)self.viewController;
+
+    NSArray* jsonEntry = message.body; // NSString:callbackId, NSString:service, NSString:action, NSArray:args
+    CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonEntry];
+    CDV_EXEC_LOG(@"Exec(%@): Calling %@.%@", command.callbackId, command.className, command.methodName);
+
+    if (![vc.commandQueue execute:command]) {
+#ifdef DEBUG
+        NSError* error = nil;
+        NSString* commandJson = nil;
+        NSData* jsonData = [NSJSONSerialization dataWithJSONObject:jsonEntry
+                                                           options:0
+                                                             error:&error];
+
+        if (error == nil) {
+            commandJson = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
+        }
+
+            static NSUInteger maxLogLength = 1024;
+            NSString* commandString = ([commandJson length] > maxLogLength) ?
+                [NSString stringWithFormat : @"%@[...]", [commandJson substringToIndex:maxLogLength]] :
+                commandJson;
+
+            NSLog(@"FAILED pluginJSON = %@", commandString);
+#endif
+    }
+}
+
+#pragma mark WKNavigationDelegate implementation
+
+- (void)webView:(WKWebView*)webView didStartProvisionalNavigation:(WKNavigation*)navigation
+{
+    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginResetNotification object:webView]];
+}
+
+- (void)webView:(WKWebView*)webView didFinishNavigation:(WKNavigation*)navigation
+{
+    CDVViewController* vc = (CDVViewController*)self.viewController;
+    [CDVUserAgentUtil releaseLock:vc.userAgentLockToken];
+
+    [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:webView]];
+}
+
+- (void)webView:(WKWebView*)theWebView didFailProvisionalNavigation:(WKNavigation*)navigation withError:(NSError*)error
+{
+    [self webView:theWebView didFailNavigation:navigation withError:error];
+}
+
+- (void)webView:(WKWebView*)theWebView didFailNavigation:(WKNavigation*)navigation withError:(NSError*)error
+{
+    CDVViewController* vc = (CDVViewController*)self.viewController;
+    [CDVUserAgentUtil releaseLock:vc.userAgentLockToken];
+
+    NSString* message = [NSString stringWithFormat:@"Failed to load webpage with error: %@", [error localizedDescription]];
+    NSLog(@"%@", message);
+
+    NSURL* errorUrl = vc.errorURL;
+    if (errorUrl) {
+        errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [message stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] relativeToURL:errorUrl];
+        NSLog(@"%@", [errorUrl absoluteString]);
+        [theWebView loadRequest:[NSURLRequest requestWithURL:errorUrl]];
+    }
+}
+
+- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView
+{
+    [webView reload];
+}
+
+- (BOOL)defaultResourcePolicyForURL:(NSURL*)url
+{
+    // all file:// urls are allowed
+    if ([url isFileURL]) {
+        return YES;
+    }
+
+    return NO;
+}
+
+- (void) webView: (WKWebView *) webView decidePolicyForNavigationAction: (WKNavigationAction*) navigationAction decisionHandler: (void (^)(WKNavigationActionPolicy)) decisionHandler
+{
+    NSURL* url = [navigationAction.request URL];
+    CDVViewController* vc = (CDVViewController*)self.viewController;
+
+    /*
+     * Give plugins the chance to handle the url
+     */
+    BOOL anyPluginsResponded = NO;
+    BOOL shouldAllowRequest = NO;
+
+    for (NSString* pluginName in vc.pluginObjects) {
+        CDVPlugin* plugin = [vc.pluginObjects objectForKey:pluginName];
+        SEL selector = NSSelectorFromString(@"shouldOverrideLoadWithRequest:navigationType:");
+        if ([plugin respondsToSelector:selector]) {
+            anyPluginsResponded = YES;
+            // https://issues.apache.org/jira/browse/CB-12497
+            int navType = (int)navigationAction.navigationType;
+            shouldAllowRequest = (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, navigationAction.request, navType));
+            if (!shouldAllowRequest) {
+                break;
+            }
+        }
+    }
+
+    if (anyPluginsResponded) {
+        return decisionHandler(shouldAllowRequest);
+    }
+
+    /*
+     * Handle all other types of urls (tel:, sms:), and requests to load a url in the main webview.
+     */
+    BOOL shouldAllowNavigation = [self defaultResourcePolicyForURL:url];
+    if (shouldAllowNavigation) {
+        return decisionHandler(YES);
+    } else {
+        [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
+    }
+
+    return decisionHandler(NO);
+}
+
+#pragma mark - Plugin interface
+
+- (void)allowsBackForwardNavigationGestures:(CDVInvokedUrlCommand*)command;
+{
+    id value = [command argumentAtIndex:0];
+    if (!([value isKindOfClass:[NSNumber class]])) {
+        value = [NSNumber numberWithBool:NO];
+    }
+
+    WKWebView* wkWebView = (WKWebView*)_engineWebView;
+    wkWebView.allowsBackForwardNavigationGestures = [value boolValue];
+}
+
+@end
+
+#pragma mark - CDVWebViewWeakScriptMessageHandler
+
+@implementation CDVWebViewWeakScriptMessageHandler
+
+- (instancetype)initWithScriptMessageHandler:(id<WKScriptMessageHandler>)scriptMessageHandler
+{
+    self = [super init];
+    if (self) {
+        _scriptMessageHandler = scriptMessageHandler;
+    }
+    return self;
+}
+
+- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message
+{
+    [self.scriptMessageHandler userContentController:userContentController didReceiveScriptMessage:message];
+}
+
+@end
diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewProcessPoolFactory.h
similarity index 73%
rename from CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h
rename to CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewProcessPoolFactory.h
index 9b9b31f..b156289 100644
--- a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h
+++ b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewProcessPoolFactory.h
@@ -6,9 +6,9 @@
  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
@@ -17,17 +17,11 @@
  under the License.
  */
 
-#if !WK_WEB_VIEW_ONLY
-
-#import <UIKit/UIKit.h>
-#import "CDVUIWebViewEngine.h"
+#import <WebKit/WebKit.h>
 
-@interface CDVUIWebViewNavigationDelegate : NSObject <UIWebViewDelegate>
-
-@property (nonatomic, weak) CDVPlugin* enginePlugin;
-
-- (instancetype)initWithEnginePlugin:(CDVPlugin*)enginePlugin;
+@interface CDVWebViewProcessPoolFactory : NSObject
+@property (nonatomic, retain) WKProcessPool* sharedPool;
 
++(instancetype) sharedFactory;
+-(WKProcessPool*) sharedProcessPool;
 @end
-
-#endif
diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewProcessPoolFactory.m
similarity index 51%
rename from CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h
rename to CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewProcessPoolFactory.m
index 8118d5f..577624e 100644
--- a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h
+++ b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewProcessPoolFactory.m
@@ -6,9 +6,9 @@
  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
@@ -17,29 +17,33 @@
  under the License.
  */
 
-#if !WK_WEB_VIEW_ONLY
+#import <Foundation/Foundation.h>
+#import <WebKit/WebKit.h>
+#import "CDVWebViewProcessPoolFactory.h"
 
-#import <UIKit/UIKit.h>
-#import <Cordova/CDVAvailability.h>
+static CDVWebViewProcessPoolFactory *factory = nil;
 
-/**
- * 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;
-}
+@implementation CDVWebViewProcessPoolFactory
 
-- (id)initWithDelegate:(NSObject <UIWebViewDelegate>*)delegate;
++ (instancetype)sharedFactory
+{
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        factory = [[CDVWebViewProcessPoolFactory alloc] init];
+    });
+    
+    return factory;
+}
 
-- (BOOL)request:(NSURLRequest*)newRequest isEqualToRequestAfterStrippingFragments:(NSURLRequest*)originalRequest;
+- (instancetype)init
+{
+    if (self = [super init]) {
+        _sharedPool = [[WKProcessPool alloc] init];
+    }
+    return self;
+}
 
+- (WKProcessPool*) sharedProcessPool {
+    return _sharedPool;
+}
 @end
-
-#endif
diff --git a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewUIDelegate.h
similarity index 75%
rename from CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h
rename to CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewUIDelegate.h
index 9b4bf18..3a71e54 100644
--- a/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h
+++ b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewUIDelegate.h
@@ -17,13 +17,12 @@
  under the License.
  */
 
-#import <Cordova/CDVPlugin.h>
-#import <Cordova/CDVWebViewEngineProtocol.h>
+#import <WebKit/WebKit.h>
 
-@interface CDVUIWebViewEngine : CDVPlugin <CDVWebViewEngineProtocol>
+@interface CDVWebViewUIDelegate : NSObject <WKUIDelegate>
 
-#if !WK_WEB_VIEW_ONLY
-@property (nonatomic, strong, readonly) id <UIWebViewDelegate> uiWebViewDelegate;
-#endif
+@property (nonatomic, copy) NSString* title;
+
+- (instancetype)initWithTitle:(NSString*)title;
 
 @end
diff --git a/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewUIDelegate.m b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewUIDelegate.m
new file mode 100644
index 0000000..8364637
--- /dev/null
+++ b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewUIDelegate.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 "CDVWebViewUIDelegate.h"
+
+@implementation CDVWebViewUIDelegate
+
+- (instancetype)initWithTitle:(NSString*)title
+{
+    self = [super init];
+    if (self) {
+        self.title = title;
+    }
+
+    return self;
+}
+
+- (void)     webView:(WKWebView*)webView runJavaScriptAlertPanelWithMessage:(NSString*)message
+    initiatedByFrame:(WKFrameInfo*)frame completionHandler:(void (^)(void))completionHandler
+{
+    UIAlertController* alert = [UIAlertController alertControllerWithTitle:self.title
+                                                                   message:message
+                                                            preferredStyle:UIAlertControllerStyleAlert];
+
+    UIAlertAction* ok = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK")
+                                                 style:UIAlertActionStyleDefault
+                                               handler:^(UIAlertAction* action)
+        {
+            completionHandler();
+            [alert dismissViewControllerAnimated:YES completion:nil];
+        }];
+
+    [alert addAction:ok];
+
+    UIViewController* rootController = [UIApplication sharedApplication].delegate.window.rootViewController;
+
+    [rootController presentViewController:alert animated:YES completion:nil];
+}
+
+- (void)     webView:(WKWebView*)webView runJavaScriptConfirmPanelWithMessage:(NSString*)message
+    initiatedByFrame:(WKFrameInfo*)frame completionHandler:(void (^)(BOOL result))completionHandler
+{
+    UIAlertController* alert = [UIAlertController alertControllerWithTitle:self.title
+                                                                   message:message
+                                                            preferredStyle:UIAlertControllerStyleAlert];
+
+    UIAlertAction* ok = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK")
+                                                 style:UIAlertActionStyleDefault
+                                               handler:^(UIAlertAction* action)
+        {
+            completionHandler(YES);
+            [alert dismissViewControllerAnimated:YES completion:nil];
+        }];
+
+    [alert addAction:ok];
+
+    UIAlertAction* cancel = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel")
+                                                     style:UIAlertActionStyleDefault
+                                                   handler:^(UIAlertAction* action)
+        {
+            completionHandler(NO);
+            [alert dismissViewControllerAnimated:YES completion:nil];
+        }];
+    [alert addAction:cancel];
+
+    UIViewController* rootController = [UIApplication sharedApplication].delegate.window.rootViewController;
+
+    [rootController presentViewController:alert animated:YES completion:nil];
+}
+
+- (void)      webView:(WKWebView*)webView runJavaScriptTextInputPanelWithPrompt:(NSString*)prompt
+          defaultText:(NSString*)defaultText initiatedByFrame:(WKFrameInfo*)frame
+    completionHandler:(void (^)(NSString* result))completionHandler
+{
+    UIAlertController* alert = [UIAlertController alertControllerWithTitle:self.title
+                                                                   message:prompt
+                                                            preferredStyle:UIAlertControllerStyleAlert];
+
+    UIAlertAction* ok = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK")
+                                                 style:UIAlertActionStyleDefault
+                                               handler:^(UIAlertAction* action)
+        {
+            completionHandler(((UITextField*)alert.textFields[0]).text);
+            [alert dismissViewControllerAnimated:YES completion:nil];
+        }];
+
+    [alert addAction:ok];
+
+    UIAlertAction* cancel = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel")
+                                                     style:UIAlertActionStyleDefault
+                                                   handler:^(UIAlertAction* action)
+        {
+            completionHandler(nil);
+            [alert dismissViewControllerAnimated:YES completion:nil];
+        }];
+    [alert addAction:cancel];
+
+    [alert addTextFieldWithConfigurationHandler:^(UITextField* textField) {
+        textField.text = defaultText;
+    }];
+
+    UIViewController* rootController = [UIApplication sharedApplication].delegate.window.rootViewController;
+
+    [rootController presentViewController:alert animated:YES completion:nil];
+}
+
+@end
diff --git a/CordovaLib/Classes/Public/CDVAppDelegate.m b/CordovaLib/Classes/Public/CDVAppDelegate.m
index 6a339f4..f13753c 100644
--- a/CordovaLib/Classes/Public/CDVAppDelegate.m
+++ b/CordovaLib/Classes/Public/CDVAppDelegate.m
@@ -25,18 +25,6 @@
 
 - (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;
 }
@@ -110,9 +98,4 @@
     return supportedInterfaceOrientations;
 }
 
-- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application
-{
-    [[NSURLCache sharedURLCache] removeAllCachedResponses];
-}
-
 @end
diff --git a/CordovaLib/Classes/Public/CDVCommandDelegate.h b/CordovaLib/Classes/Public/CDVCommandDelegate.h
index efc9ad3..c0ece71 100644
--- a/CordovaLib/Classes/Public/CDVCommandDelegate.h
+++ b/CordovaLib/Classes/Public/CDVCommandDelegate.h
@@ -45,7 +45,7 @@ typedef NSURL* (^ UrlTransformerBlock)(NSURL*);
 - (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop;
 // Runs the given block on a background thread using a shared thread-pool.
 - (void)runInBackground:(void (^)(void))block;
-// Returns the User-Agent of the associated UIWebView.
+// Returns the User-Agent of the associated WKWebView.
 - (NSString*)userAgent;
 
 @end
diff --git a/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m b/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m
index effca6f..d315072 100644
--- a/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m
+++ b/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m
@@ -92,7 +92,7 @@
     // 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).
+    //    function (possible since WKWebViewDelegate callbacks can be synchronous).
     // For !isMainThread -
     //    It's a hard error to eval on the non-UI thread.
     // For !_commandQueue.currentlyExecuting -
diff --git a/CordovaLib/Classes/Public/CDVUserAgentUtil.m b/CordovaLib/Classes/Public/CDVUserAgentUtil.m
index c5e9e2b..1968a21 100644
--- a/CordovaLib/Classes/Public/CDVUserAgentUtil.m
+++ b/CordovaLib/Classes/Public/CDVUserAgentUtil.m
@@ -32,7 +32,6 @@ static NSInteger gNextLockToken = 0;
 static NSInteger gCurrentLockToken = 0;
 static NSMutableArray* gPendingSetUserAgentBlocks = nil;
 
-#if WK_WEB_VIEW_ONLY
 #import <WebKit/WebKit.h>
 
 @interface WKWebView(SynchronousEvaluateJavaScript)
@@ -64,7 +63,6 @@ static NSMutableArray* gPendingSetUserAgentBlocks = nil;
     return resultString;
 }
 @end
-#endif
 
 @implementation CDVUserAgentUtil
 
@@ -88,11 +86,7 @@ static NSMutableArray* gPendingSetUserAgentBlocks = nil;
         BOOL cachedValueIsOld = ![systemAndLocale isEqualToString:cordovaUserAgentVersion];
 
         if ((gOriginalUserAgent == nil) || cachedValueIsOld) {
- #if WK_WEB_VIEW_ONLY
             WKWebView* sampleWebView = [[WKWebView alloc] initWithFrame:CGRectZero];
- #else
-            UIWebView* sampleWebView = [[UIWebView alloc] initWithFrame:CGRectZero];
-#endif
             gOriginalUserAgent = [sampleWebView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
 
             [userDefaults setObject:gOriginalUserAgent forKey:kCdvUserAgentKey];
@@ -106,7 +100,7 @@ static NSMutableArray* gPendingSetUserAgentBlocks = nil;
 
 + (void)onAppLocaleDidChange:(NSNotification*)notification
 {
-    // TODO: We should figure out how to update the user-agent of existing UIWebViews when this happens.
+    // TODO: We should figure out how to update the user-agent of existing WKWebViews when this happens.
     // Maybe use the PDF bug (noted in setUserAgent:).
     gOriginalUserAgent = nil;
 }
@@ -151,9 +145,9 @@ static NSMutableArray* gPendingSetUserAgentBlocks = nil;
     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.
+    // Setting the UserAgent must occur before a WKWebView 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
+    // Except! When a PDF is loaded, all currently active WKWebViews 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];
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index 75e74ad..152ffdc 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -20,11 +20,11 @@
 #import <objc/message.h>
 #import "CDV.h"
 #import "CDVPlugin+Private.h"
+#import "CDVWebViewUIDelegate.h"
 #import "CDVConfigParser.h"
 #import "CDVUserAgentUtil.h"
 #import <AVFoundation/AVFoundation.h>
 #import "NSDictionary+CordovaPreferences.h"
-#import "CDVLocalStorage.h"
 #import "CDVCommandDelegateImpl.h"
 #import <Foundation/NSCharacterSet.h>
 
@@ -284,8 +284,6 @@
     }
     [self.settings setCordovaSetting:backupWebStorageType forKey:@"BackupWebStorage"];
 
-    [CDVLocalStorage __fixupDatabaseLocationsWithBackupType:backupWebStorageType];
-
     // // Instantiate the WebView ///////////////
 
     if (!self.webView) {
@@ -294,17 +292,6 @@
 
     // /////////////////
 
-    /*
-     * 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 7/8 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"];
 
@@ -514,7 +501,7 @@
     NSString* webViewEngineClass = [self.settings cordovaSettingForKey:@"CordovaWebViewEngine"];
 
     if (!defaultWebViewEngineClass) {
-        defaultWebViewEngineClass = @"CDVUIWebViewEngine";
+        defaultWebViewEngineClass = @"CDVWebViewEngine";
     }
     if (!webViewEngineClass) {
         webViewEngineClass = defaultWebViewEngineClass;
@@ -523,7 +510,7 @@
     // 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, or can't load the request, we use UIWebView
+        // if a webView engine returns nil (not supported by the current iOS version) or doesn't conform to the protocol, or can't load the request, we use WKWebView
         if (!self.webViewEngine || ![self.webViewEngine conformsToProtocol:@protocol(CDVWebViewEngineProtocol)] || ![self.webViewEngine canLoadRequest:[NSURLRequest requestWithURL:self.appUrl]]) {
             self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) alloc] initWithFrame:bounds];
         }
diff --git a/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h b/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h
index 34d07f3..e6126a4 100644
--- a/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h
+++ b/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h
@@ -20,7 +20,6 @@
 #import <UIKit/UIKit.h>
 
 #define kCDVWebViewEngineScriptMessageHandlers @"kCDVWebViewEngineScriptMessageHandlers"
-#define kCDVWebViewEngineUIWebViewDelegate @"kCDVWebViewEngineUIWebViewDelegate"
 #define kCDVWebViewEngineWKNavigationDelegate @"kCDVWebViewEngineWKNavigationDelegate"
 #define kCDVWebViewEngineWKUIDelegate @"kCDVWebViewEngineWKUIDelegate"
 #define kCDVWebViewEngineWebViewPreferences @"kCDVWebViewEngineWebViewPreferences"
diff --git a/CordovaLib/Cordova/Cordova.h b/CordovaLib/Cordova/Cordova.h
index 8f31077..341e055 100644
--- a/CordovaLib/Cordova/Cordova.h
+++ b/CordovaLib/Cordova/Cordova.h
@@ -44,6 +44,7 @@ FOUNDATION_EXPORT const unsigned char CordovaVersionString[];
 #import <Cordova/CDVWebViewEngineProtocol.h>
 #import <Cordova/NSDictionary+CordovaPreferences.h>
 #import <Cordova/NSMutableArray+QueueAdditions.h>
+#import <Cordova/CDVWebViewUIDelegate.h>
 #import <Cordova/CDVWhitelist.h>
 #import <Cordova/CDVScreenOrientationDelegate.h>
 #import <Cordova/CDVTimer.h>
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index cb67163..7c449ba 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -9,22 +9,21 @@
 /* Begin PBXBuildFile section */
 		28BFF9141F355A4E00DDF01A /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BFF9121F355A4E00DDF01A /* CDVLogger.h */; };
 		28BFF9151F355A4E00DDF01A /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 28BFF9131F355A4E00DDF01A /* CDVLogger.m */; };
-		30193A501AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 30193A4E1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m */; };
-		30193A511AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30193A4F1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h */; };
 		3093E2231B16D6A3003F381A /* CDVIntentAndNavigationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */; };
 		3093E2241B16D6A3003F381A /* CDVIntentAndNavigationFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */; };
-		7E7F69B61ABA35D8007546F4 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */; };
-		7E7F69B81ABA368F007546F4 /* CDVUIWebViewEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */; };
+		4E23F8FB23E16E96006CD852 /* CDVWebViewProcessPoolFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E23F8F523E16E96006CD852 /* CDVWebViewProcessPoolFactory.m */; };
+		4E23F8FC23E16E96006CD852 /* CDVWebViewUIDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E23F8F623E16E96006CD852 /* CDVWebViewUIDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		4E23F8FD23E16E96006CD852 /* CDVWebViewUIDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E23F8F723E16E96006CD852 /* CDVWebViewUIDelegate.m */; };
+		4E23F8FE23E16E96006CD852 /* CDVWebViewEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E23F8F823E16E96006CD852 /* CDVWebViewEngine.m */; };
+		4E23F8FF23E16E96006CD852 /* CDVWebViewProcessPoolFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E23F8F923E16E96006CD852 /* CDVWebViewProcessPoolFactory.h */; };
+		4E23F90023E16E96006CD852 /* CDVWebViewEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E23F8FA23E16E96006CD852 /* CDVWebViewEngine.h */; };
+		4E23F90323E17FFA006CD852 /* CDVWebViewUIDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E23F8F623E16E96006CD852 /* CDVWebViewUIDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7E7F69B91ABA3692007546F4 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */; };
 		7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF21AB9028C008C4574 /* CDVDebug.h */; };
 		7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */; };
 		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 */; };
 		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 */; 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 */; 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 */; };
@@ -81,10 +80,6 @@
 		9052DE822150D040008E83D4 /* CDVGestureHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */; };
 		9052DE832150D040008E83D4 /* CDVIntentAndNavigationFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */; };
 		9052DE842150D040008E83D4 /* CDVHandleOpenURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF91AB9028C008C4574 /* CDVHandleOpenURL.m */; };
-		9052DE852150D040008E83D4 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CFC1AB9028C008C4574 /* CDVLocalStorage.m */; };
-		9052DE862150D040008E83D4 /* CDVUIWebViewNavigationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 30193A4E1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m */; };
-		9052DE872150D040008E83D4 /* CDVUIWebViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CFF1AB9028C008C4574 /* CDVUIWebViewDelegate.m */; };
-		9052DE882150D040008E83D4 /* CDVUIWebViewEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D011AB9028C008C4574 /* CDVUIWebViewEngine.m */; };
 		9052DE892150D06B008E83D4 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF21AB9028C008C4574 /* CDVDebug.h */; };
 		9052DE8A2150D06B008E83D4 /* CDVJSON_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */; };
 		9052DE8B2150D06B008E83D4 /* CDVPlugin+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF51AB9028C008C4574 /* CDVPlugin+Private.h */; };
@@ -92,9 +87,6 @@
 		9052DE8D2150D06B008E83D4 /* CDVGestureHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */; };
 		9052DE8E2150D06B008E83D4 /* CDVIntentAndNavigationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */; };
 		9052DE8F2150D06B008E83D4 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */; };
-		9052DE902150D06B008E83D4 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */; };
-		9052DE912150D06B008E83D4 /* CDVUIWebViewNavigationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30193A4F1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h */; };
-		9052DE922150D06B008E83D4 /* CDVUIWebViewEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */; };
 		A3B082D41BB15CEA00D8DC35 /* CDVGestureHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */; };
 		A3B082D51BB15CEA00D8DC35 /* CDVGestureHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */; };
 		C0C01EB61E3911D50056E6CB /* Cordova.h in Headers */ = {isa = PBXBuildFile; fileRef = C0C01EB41E3911D50056E6CB /* Cordova.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -119,16 +111,19 @@
 		C0C01ECD1E39131A0056E6CB /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		C0C01ECE1E39131A0056E6CB /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		C0C01ECF1E39131A0056E6CB /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		C0C01ED01E3913610056E6CB /* CDVUIWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
 		28BFF9121F355A4E00DDF01A /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVLogger.h; sourceTree = "<group>"; };
 		28BFF9131F355A4E00DDF01A /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVLogger.m; sourceTree = "<group>"; };
-		30193A4E1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVUIWebViewNavigationDelegate.m; sourceTree = "<group>"; };
-		30193A4F1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVUIWebViewNavigationDelegate.h; sourceTree = "<group>"; };
 		3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVIntentAndNavigationFilter.h; sourceTree = "<group>"; };
 		3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVIntentAndNavigationFilter.m; sourceTree = "<group>"; };
+		4E23F8F523E16E96006CD852 /* CDVWebViewProcessPoolFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewProcessPoolFactory.m; sourceTree = "<group>"; };
+		4E23F8F623E16E96006CD852 /* CDVWebViewUIDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewUIDelegate.h; sourceTree = "<group>"; };
+		4E23F8F723E16E96006CD852 /* CDVWebViewUIDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewUIDelegate.m; sourceTree = "<group>"; };
+		4E23F8F823E16E96006CD852 /* CDVWebViewEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewEngine.m; sourceTree = "<group>"; };
+		4E23F8F923E16E96006CD852 /* CDVWebViewProcessPoolFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewProcessPoolFactory.h; sourceTree = "<group>"; };
+		4E23F8FA23E16E96006CD852 /* CDVWebViewEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewEngine.h; sourceTree = "<group>"; };
 		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		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>"; };
@@ -136,12 +131,6 @@
 		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>"; };
@@ -241,6 +230,19 @@
 			path = CDVIntentAndNavigationFilter;
 			sourceTree = "<group>";
 		};
+		4E23F8F423E16D30006CD852 /* CDVWebViewEngine */ = {
+			isa = PBXGroup;
+			children = (
+				4E23F8FA23E16E96006CD852 /* CDVWebViewEngine.h */,
+				4E23F8F823E16E96006CD852 /* CDVWebViewEngine.m */,
+				4E23F8F923E16E96006CD852 /* CDVWebViewProcessPoolFactory.h */,
+				4E23F8F523E16E96006CD852 /* CDVWebViewProcessPoolFactory.m */,
+				4E23F8F623E16E96006CD852 /* CDVWebViewUIDelegate.h */,
+				4E23F8F723E16E96006CD852 /* CDVWebViewUIDelegate.m */,
+			);
+			path = CDVWebViewEngine;
+			sourceTree = "<group>";
+		};
 		7ED95CF11AB9028C008C4574 /* Private */ = {
 			isa = PBXGroup;
 			children = (
@@ -258,12 +260,11 @@
 		7ED95CF61AB9028C008C4574 /* Plugins */ = {
 			isa = PBXGroup;
 			children = (
+				4E23F8F423E16D30006CD852 /* CDVWebViewEngine */,
 				28BFF9111F355A1D00DDF01A /* CDVLogger */,
 				A3B082D11BB15CEA00D8DC35 /* CDVGestureHandler */,
 				3093E2201B16D6A3003F381A /* CDVIntentAndNavigationFilter */,
 				7ED95CF71AB9028C008C4574 /* CDVHandleOpenURL */,
-				7ED95CFA1AB9028C008C4574 /* CDVLocalStorage */,
-				7ED95CFD1AB9028C008C4574 /* CDVUIWebViewEngine */,
 			);
 			path = Plugins;
 			sourceTree = "<group>";
@@ -277,28 +278,6 @@
 			path = CDVHandleOpenURL;
 			sourceTree = "<group>";
 		};
-		7ED95CFA1AB9028C008C4574 /* CDVLocalStorage */ = {
-			isa = PBXGroup;
-			children = (
-				7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */,
-				7ED95CFC1AB9028C008C4574 /* CDVLocalStorage.m */,
-			);
-			path = CDVLocalStorage;
-			sourceTree = "<group>";
-		};
-		7ED95CFD1AB9028C008C4574 /* CDVUIWebViewEngine */ = {
-			isa = PBXGroup;
-			children = (
-				30193A4F1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h */,
-				30193A4E1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m */,
-				7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */,
-				7ED95CFF1AB9028C008C4574 /* CDVUIWebViewDelegate.m */,
-				7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */,
-				7ED95D011AB9028C008C4574 /* CDVUIWebViewEngine.m */,
-			);
-			path = CDVUIWebViewEngine;
-			sourceTree = "<group>";
-		};
 		7ED95D0E1AB9029B008C4574 /* Public */ = {
 			isa = PBXGroup;
 			children = (
@@ -389,6 +368,7 @@
 				C0C01ECC1E39131A0056E6CB /* CDVWebViewEngineProtocol.h in Headers */,
 				C0C01ECD1E39131A0056E6CB /* CDVWhitelist.h in Headers */,
 				C0C01ECE1E39131A0056E6CB /* NSDictionary+CordovaPreferences.h in Headers */,
+				4E23F90323E17FFA006CD852 /* CDVWebViewUIDelegate.h in Headers */,
 				C0C01ECF1E39131A0056E6CB /* NSMutableArray+QueueAdditions.h in Headers */,
 				9052DE892150D06B008E83D4 /* CDVDebug.h in Headers */,
 				9052DE8A2150D06B008E83D4 /* CDVJSON_private.h in Headers */,
@@ -397,10 +377,6 @@
 				9052DE8D2150D06B008E83D4 /* CDVGestureHandler.h in Headers */,
 				9052DE8E2150D06B008E83D4 /* CDVIntentAndNavigationFilter.h in Headers */,
 				9052DE8F2150D06B008E83D4 /* CDVHandleOpenURL.h in Headers */,
-				9052DE902150D06B008E83D4 /* CDVLocalStorage.h in Headers */,
-				9052DE912150D06B008E83D4 /* CDVUIWebViewNavigationDelegate.h in Headers */,
-				C0C01ED01E3913610056E6CB /* CDVUIWebViewDelegate.h in Headers */,
-				9052DE922150D06B008E83D4 /* CDVUIWebViewEngine.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -415,17 +391,20 @@
 				7ED95D3A1AB9029B008C4574 /* CDVCommandDelegate.h in Headers */,
 				7ED95D3B1AB9029B008C4574 /* CDVCommandDelegateImpl.h in Headers */,
 				7ED95D3D1AB9029B008C4574 /* CDVCommandQueue.h in Headers */,
+				4E23F8FF23E16E96006CD852 /* CDVWebViewProcessPoolFactory.h in Headers */,
 				7ED95D3F1AB9029B008C4574 /* CDVConfigParser.h in Headers */,
 				7ED95D411AB9029B008C4574 /* CDVInvokedUrlCommand.h in Headers */,
 				7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */,
 				7ED95D451AB9029B008C4574 /* CDVPlugin.h in Headers */,
 				7ED95D471AB9029B008C4574 /* CDVPluginResult.h in Headers */,
 				7ED95D491AB9029B008C4574 /* CDVScreenOrientationDelegate.h in Headers */,
+				4E23F8FC23E16E96006CD852 /* CDVWebViewUIDelegate.h in Headers */,
 				7ED95D4A1AB9029B008C4574 /* CDVTimer.h in Headers */,
 				7ED95D4C1AB9029B008C4574 /* CDVURLProtocol.h in Headers */,
 				7ED95D4E1AB9029B008C4574 /* CDVUserAgentUtil.h in Headers */,
 				7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */,
 				7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */,
+				4E23F90023E16E96006CD852 /* CDVWebViewEngine.h in Headers */,
 				7ED95D531AB9029B008C4574 /* CDVWhitelist.h in Headers */,
 				7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */,
 				7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */,
@@ -436,10 +415,6 @@
 				A3B082D41BB15CEA00D8DC35 /* CDVGestureHandler.h in Headers */,
 				3093E2231B16D6A3003F381A /* CDVIntentAndNavigationFilter.h in Headers */,
 				7E7F69B91ABA3692007546F4 /* CDVHandleOpenURL.h in Headers */,
-				7E7F69B61ABA35D8007546F4 /* CDVLocalStorage.h in Headers */,
-				30193A511AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h in Headers */,
-				7ED95D0A1AB9028C008C4574 /* CDVUIWebViewDelegate.h in Headers */,
-				7E7F69B81ABA368F007546F4 /* CDVUIWebViewEngine.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -541,10 +516,6 @@
 				9052DE822150D040008E83D4 /* CDVGestureHandler.m in Sources */,
 				9052DE832150D040008E83D4 /* CDVIntentAndNavigationFilter.m in Sources */,
 				9052DE842150D040008E83D4 /* CDVHandleOpenURL.m in Sources */,
-				9052DE852150D040008E83D4 /* CDVLocalStorage.m in Sources */,
-				9052DE862150D040008E83D4 /* CDVUIWebViewNavigationDelegate.m in Sources */,
-				9052DE872150D040008E83D4 /* CDVUIWebViewDelegate.m in Sources */,
-				9052DE882150D040008E83D4 /* CDVUIWebViewEngine.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -561,21 +532,20 @@
 				7ED95D461AB9029B008C4574 /* CDVPlugin.m in Sources */,
 				7ED95D481AB9029B008C4574 /* CDVPluginResult.m in Sources */,
 				7ED95D4B1AB9029B008C4574 /* CDVTimer.m in Sources */,
+				4E23F8FE23E16E96006CD852 /* CDVWebViewEngine.m in Sources */,
 				7ED95D4D1AB9029B008C4574 /* CDVURLProtocol.m in Sources */,
+				4E23F8FB23E16E96006CD852 /* CDVWebViewProcessPoolFactory.m in Sources */,
 				7ED95D4F1AB9029B008C4574 /* CDVUserAgentUtil.m in Sources */,
 				7ED95D511AB9029B008C4574 /* CDVViewController.m in Sources */,
 				7ED95D541AB9029B008C4574 /* CDVWhitelist.m in Sources */,
 				7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */,
 				7ED95D5A1AB9029B008C4574 /* NSMutableArray+QueueAdditions.m in Sources */,
 				7ED95D041AB9028C008C4574 /* CDVJSON_private.m in Sources */,
+				4E23F8FD23E16E96006CD852 /* CDVWebViewUIDelegate.m in Sources */,
 				28BFF9151F355A4E00DDF01A /* CDVLogger.m in Sources */,
 				A3B082D51BB15CEA00D8DC35 /* CDVGestureHandler.m in Sources */,
 				3093E2241B16D6A3003F381A /* CDVIntentAndNavigationFilter.m in Sources */,
 				7ED95D071AB9028C008C4574 /* CDVHandleOpenURL.m in Sources */,
-				7ED95D091AB9028C008C4574 /* CDVLocalStorage.m in Sources */,
-				30193A501AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m in Sources */,
-				7ED95D0B1AB9028C008C4574 /* CDVUIWebViewDelegate.m in Sources */,
-				7ED95D0D1AB9028C008C4574 /* CDVUIWebViewEngine.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -643,7 +613,6 @@
 				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"DEBUG=1",
-					"WK_WEB_VIEW_ONLY=$(WK_WEB_VIEW_ONLY)",
 					"$(inherited)",
 				);
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -660,7 +629,6 @@
 				PRODUCT_NAME = Cordova;
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
-				WK_WEB_VIEW_ONLY = 0;
 			};
 			name = Debug;
 		};
@@ -705,10 +673,7 @@
 				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"WK_WEB_VIEW_ONLY=$(WK_WEB_VIEW_ONLY)",
-					"$(inherited)",
-				);
+				GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -723,7 +688,6 @@
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
 				VALIDATE_PRODUCT = YES;
-				WK_WEB_VIEW_ONLY = 0;
 			};
 			name = Release;
 		};
diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js
index 32961a9..872124f 100644
--- a/CordovaLib/cordova.js
+++ b/CordovaLib/cordova.js
@@ -1,5 +1,5 @@
 // Platform: ios
-// 9c79667cd175f51fd2edf2dc91ac8be98b89076a
+// 17ed8ef404a1efc5cfc6c14e5df031f7d84e23f8
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -50,10 +50,10 @@ var define;
 
     require = function (id) {
         if (!modules[id]) {
-            throw 'module ' + id + ' not found';
+            throw new Error('module ' + id + ' not found');
         } else if (id in inProgressModules) {
             var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
-            throw 'Cycle in require graph: ' + cycle;
+            throw new Error('Cycle in require graph: ' + cycle);
         }
         if (modules[id].factory) {
             try {
@@ -70,7 +70,7 @@ var define;
 
     define = function (id, factory) {
         if (Object.prototype.hasOwnProperty.call(modules, id)) {
-            throw 'module ' + id + ' already defined';
+            throw new Error('module ' + id + ' already defined');
         }
 
         modules[id] = {
@@ -162,7 +162,7 @@ function createEvent (type, data) {
     event.initEvent(type, false, false);
     if (data) {
         for (var i in data) {
-            if (data.hasOwnProperty(i)) {
+            if (Object.prototype.hasOwnProperty.call(data, i)) {
                 event[i] = data[i];
             }
         }
@@ -310,9 +310,7 @@ var cordova = {
             }
         } catch (err) {
             var msg = 'Error in ' + (isSuccess ? 'Success' : 'Error') + ' callbackId: ' + callbackId + ' : ' + err;
-            console && console.log && console.log(msg);
-            console && console.log && err.stack && console.log(err.stack);
-            cordova.fireWindowEvent('cordovacallbackerror', { 'message': msg });
+            cordova.fireWindowEvent('cordovacallbackerror', { message: msg, error: err });
             throw err;
         }
     },
@@ -340,12 +338,12 @@ var utils = require('cordova/utils');
 var moduleExports = module.exports;
 
 var typeMap = {
-    'A': 'Array',
-    'D': 'Date',
-    'N': 'Number',
-    'S': 'String',
-    'F': 'Function',
-    'O': 'Object'
+    A: 'Array',
+    D: 'Date',
+    N: 'Number',
+    S: 'String',
+    F: 'Function',
+    O: 'Object'
 };
 
 function extractParamName (callee, argIndex) {
@@ -498,7 +496,7 @@ var utils = require('cordova/utils');
 
 function each (objects, func, context) {
     for (var prop in objects) {
-        if (objects.hasOwnProperty(prop)) {
+        if (Object.prototype.hasOwnProperty.call(objects, prop)) {
             func.apply(context, [objects[prop], prop]);
         }
     }
@@ -578,7 +576,7 @@ function include (parent, objects, clobber, merge) {
  */
 function recursiveMerge (target, src) {
     for (var prop in src) {
-        if (src.hasOwnProperty(prop)) {
+        if (Object.prototype.hasOwnProperty.call(src, prop)) {
             if (target.prototype && target.prototype.constructor === target) {
                 // If the target object is a constructor override off prototype.
                 clobber(target.prototype, prop, src[prop]);
@@ -871,19 +869,13 @@ module.exports = channel;
 // file: ../cordova-ios/cordova-js-src/exec.js
 define("cordova/exec", function(require, exports, module) {
 
-/* global require, module, atob, document */
-
 /**
- * Creates a gap bridge iframe used to notify the native code about queued
+ * Creates the exec bridge used to notify the native code of
  * commands.
  */
 var cordova = require('cordova');
 var utils = require('cordova/utils');
 var base64 = require('cordova/base64');
-var execIframe;
-var commandQueue = []; // Contains pending JS->Native messages.
-var isInContextOfEvalJs = 0;
-var failSafeTimerId = 0;
 
 function massageArgsJsToNative (args) {
     if (!args || utils.typeName(args) !== 'Array') {
@@ -893,8 +885,8 @@ function massageArgsJsToNative (args) {
     args.forEach(function (arg, i) {
         if (utils.typeName(arg) === 'ArrayBuffer') {
             ret.push({
-                'CDVType': 'ArrayBuffer',
-                'data': base64.fromArrayBuffer(arg)
+                CDVType: 'ArrayBuffer',
+                data: base64.fromArrayBuffer(arg)
             });
         } else {
             ret.push(arg);
@@ -913,7 +905,7 @@ function massageMessageNativeToJs (message) {
             return ret.buffer;
         };
         var base64ToArrayBuffer = function (b64) {
-            return stringToArrayBuffer(atob(b64));
+            return stringToArrayBuffer(atob(b64)); // eslint-disable-line no-undef
         };
         message = base64ToArrayBuffer(message.data);
     }
@@ -922,7 +914,7 @@ function massageMessageNativeToJs (message) {
 
 function convertMessageToArgsNativeToJs (message) {
     var args = [];
-    if (!message || !message.hasOwnProperty('CDVType')) {
+    if (!message || !Object.prototype.hasOwnProperty.call(message, 'CDVType')) {
         args.push(message);
     } else if (message.CDVType === 'MultiPart') {
         message.messages.forEach(function (e) {
@@ -934,8 +926,7 @@ function convertMessageToArgsNativeToJs (message) {
     return args;
 }
 
-function iOSExec () {
-
+var iOSExec = function () {
     var successCallback, failCallback, service, action, actionArgs;
     var callbackId = null;
     if (typeof arguments[0] !== 'string') {
@@ -952,9 +943,8 @@ function iOSExec () {
         // an invalid callbackId and passes it even if no callbacks were given.
         callbackId = 'INVALID';
     } else {
-        throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' +
-            'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);'
-        );
+   	    throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + // eslint-disable-line
+            'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);');
     }
 
     // If actionArgs is not provided, default to an empty array
@@ -970,120 +960,25 @@ function iOSExec () {
 
     actionArgs = massageArgsJsToNative(actionArgs);
 
-    var command = [callbackId, service, action, actionArgs];
-
-    // Stringify and queue the command. We stringify to command now to
-    // effectively clone the command arguments in case they are mutated before
-    // the command is executed.
-    commandQueue.push(JSON.stringify(command));
-
-    // If we're in the context of a stringByEvaluatingJavaScriptFromString call,
-    // then the queue will be flushed when it returns; no need for a poke.
-    // Also, if there is already a command in the queue, then we've already
-    // poked the native side, so there is no reason to do so again.
-    if (!isInContextOfEvalJs && commandQueue.length === 1) {
-        pokeNative();
-    }
-}
-
-// CB-10530
-function proxyChanged () {
-    var cexec = cordovaExec();
-
-    return (execProxy !== cexec && // proxy objects are different
-            iOSExec !== cexec // proxy object is not the current iOSExec
-    );
-}
-
-// CB-10106
-function handleBridgeChange () {
-    if (proxyChanged()) {
-        var commandString = commandQueue.shift();
-        while (commandString) {
-            var command = JSON.parse(commandString);
-            var callbackId = command[0];
-            var service = command[1];
-            var action = command[2];
-            var actionArgs = command[3];
-            var callbacks = cordova.callbacks[callbackId] || {};
-
-            execProxy(callbacks.success, callbacks.fail, service, action, actionArgs);
-
-            commandString = commandQueue.shift();
-        }
-        return true;
-    }
-
-    return false;
-}
-
-function pokeNative () {
-    // CB-5488 - Don't attempt to create iframe before document.body is available.
-    if (!document.body) {
-        setTimeout(pokeNative);
-        return;
-    }
-
-    // Check if they've removed it from the DOM, and put it back if so.
-    if (execIframe && execIframe.contentWindow) {
-        execIframe.contentWindow.location = 'gap://ready';
-    } else {
-        execIframe = document.createElement('iframe');
-        execIframe.style.display = 'none';
-        execIframe.src = 'gap://ready';
-        document.body.appendChild(execIframe);
-    }
-    // Use a timer to protect against iframe being unloaded during the poke (CB-7735).
-    // This makes the bridge ~ 7% slower, but works around the poke getting lost
-    // when the iframe is removed from the DOM.
-    // An onunload listener could be used in the case where the iframe has just been
-    // created, but since unload events fire only once, it doesn't work in the normal
-    // case of iframe reuse (where unload will have already fired due to the attempted
-    // navigation of the page).
-    failSafeTimerId = setTimeout(function () {
-        if (commandQueue.length) {
-            // CB-10106 - flush the queue on bridge change
-            if (!handleBridgeChange()) {
-                pokeNative();
-            }
-        }
-    }, 50); // Making this > 0 improves performance (marginally) in the normal case (where it doesn't fire).
-}
-
-iOSExec.nativeFetchMessages = function () {
-    // Stop listing for window detatch once native side confirms poke.
-    if (failSafeTimerId) {
-        clearTimeout(failSafeTimerId);
-        failSafeTimerId = 0;
-    }
-    // Each entry in commandQueue is a JSON string already.
-    if (!commandQueue.length) {
-        return '';
-    }
-    var json = '[' + commandQueue.join(',') + ']';
-    commandQueue.length = 0;
-    return json;
+    // CB-10133 DataClone DOM Exception 25 guard (fast function remover)
+    var command = [callbackId, service, action, JSON.parse(JSON.stringify(actionArgs))];
+    window.webkit.messageHandlers.cordova.postMessage(command);
 };
 
 iOSExec.nativeCallback = function (callbackId, status, message, keepCallback, debug) {
-    return iOSExec.nativeEvalAndFetch(function () {
-        var success = status === 0 || status === 1;
-        var args = convertMessageToArgsNativeToJs(message);
-        function nc2 () {
-            cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
-        }
-        setTimeout(nc2, 0);
+    var success = status === 0 || status === 1;
+    var args = convertMessageToArgsNativeToJs(message);
+    Promise.resolve().then(function () {
+        cordova.callbackFromNative(callbackId, success, status, args, keepCallback); // eslint-disable-line
     });
 };
 
+// for backwards compatibility
 iOSExec.nativeEvalAndFetch = function (func) {
-    // This shouldn't be nested, but better to be safe.
-    isInContextOfEvalJs++;
     try {
         func();
-        return iOSExec.nativeFetchMessages();
-    } finally {
-        isInContextOfEvalJs--;
+    } catch (e) {
+        console.log(e);
     }
 };
 
@@ -1153,7 +1048,6 @@ var cordova = require('cordova');
 var modulemapper = require('cordova/modulemapper');
 var platform = require('cordova/platform');
 var pluginloader = require('cordova/pluginloader');
-var utils = require('cordova/utils');
 
 var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady];
 
@@ -1173,34 +1067,6 @@ window.setTimeout(function () {
     }
 }, 5000);
 
-// Replace navigator before any modules are required(), to ensure it happens as soon as possible.
-// We replace it so that properties that can't be clobbered can instead be overridden.
-function replaceNavigator (origNavigator) {
-    var CordovaNavigator = function () {};
-    CordovaNavigator.prototype = origNavigator;
-    var newNavigator = new CordovaNavigator();
-    // This work-around really only applies to new APIs that are newer than Function.bind.
-    // Without it, APIs such as getGamepads() break.
-    if (CordovaNavigator.bind) {
-        for (var key in origNavigator) {
-            if (typeof origNavigator[key] === 'function') {
-                newNavigator[key] = origNavigator[key].bind(origNavigator);
-            } else {
-                (function (k) {
-                    utils.defineGetterSetter(newNavigator, key, function () {
-                        return origNavigator[k];
-                    });
-                })(key);
-            }
-        }
-    }
-    return newNavigator;
-}
-
-if (window.navigator) {
-    window.navigator = replaceNavigator(window.navigator);
-}
-
 if (!window.console) {
     window.console = {
         log: function () {}
@@ -1266,7 +1132,6 @@ channel.join(function () {
     channel.join(function () {
         require('cordova').fireDocumentEvent('deviceready');
     }, channel.deviceReadyChannelsArray);
-
 }, platformInitChannelsArray);
 
 });
@@ -1378,6 +1243,10 @@ module.exports = {
         // see the file under plugin/ios/console.js
         require('cordova/modulemapper').clobbers('cordova/plugin/ios/console', 'window.console');
 
+        // Attach the wkwebkit utility to window.WkWebView
+        // see the file under plugin/ios/wkwebkit.js
+        require('cordova/modulemapper').clobbers('cordova/plugin/ios/wkwebkit', 'window.WkWebView');
+
         require('cordova/channel').onNativeReady.fire();
     }
 };
@@ -1851,7 +1720,6 @@ function __format (formatString, args) {
 }
 
 function __formatted (object, formatChar) {
-
     try {
         switch (formatChar) {
         case 'j':
@@ -1889,6 +1757,21 @@ document.addEventListener('deviceready', logger.__onDeviceReady, false);
 
 });
 
+// file: ../cordova-ios/cordova-js-src/plugin/ios/wkwebkit.js
+define("cordova/plugin/ios/wkwebkit", function(require, exports, module) {
+
+var exec = require('cordova/exec');
+
+var WkWebKit = {
+    allowsBackForwardNavigationGestures: function (allow) {
+        exec(null, null, 'CDVWebViewEngine', 'allowsBackForwardNavigationGestures', [allow]);
+    }
+};
+
+module.exports = WkWebKit;
+
+});
+
 // file: src/common/pluginloader.js
 define("cordova/pluginloader", function(require, exports, module) {
 
@@ -2160,7 +2043,6 @@ utils.extend = (function () {
     var F = function () {};
     // extend Child from Parent
     return function (Child, Parent) {
-
         F.prototype = Parent.prototype;
         Child.prototype = new F();
         Child.__super__ = Parent.prototype;
diff --git a/bin/lib/create.js b/bin/lib/create.js
index f90105b..6a0d9f3 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -23,7 +23,6 @@ const shell = require('shelljs');
 const Q = require('q');
 const path = require('path');
 const fs = require('fs');
-const xcode = require('xcode');
 const xmlescape = require('xml-escape');
 const ROOT = path.join(__dirname, '..', '..');
 const events = require('cordova-common').events;
@@ -268,13 +267,10 @@ function update_cordova_subproject (argv) {
 
     const projectPath = AbsProjectPath(argv[0]);
     let cordovaLibXcodePath;
-    let projectConfig;
     if (argv.length < 3) {
         cordovaLibXcodePath = path.join(ROOT, 'CordovaLib', 'CordovaLib.xcodeproj');
-        projectConfig = argv[1];
     } else {
         cordovaLibXcodePath = AbsProjectPath(argv[1]);
-        projectConfig = argv[2];
     }
 
     const parentProjectPath = AbsParentPath(projectPath);
@@ -301,15 +297,6 @@ function update_cordova_subproject (argv) {
     if (!found) {
         throw new Error(`Entry not found in project file for sub-project: ${subprojectPath}`);
     }
-
-    const wkWebViewOnly = projectConfig.getPreference('WKWebViewOnly') === 'true';
-    if (wkWebViewOnly) {
-        const pbxPath = path.join(cordovaLibXcodePath, 'project.pbxproj');
-        const xcodeproj = xcode.project(pbxPath);
-        xcodeproj.parseSync();
-        xcodeproj.updateBuildProperty('WK_WEB_VIEW_ONLY', '1');
-        fs.writeFileSync(pbxPath, xcodeproj.writeSync());
-    }
 }
 
 exports.updateSubprojectHelp = updateSubprojectHelp;
diff --git a/bin/templates/project/__PROJECT_NAME__/Classes/MainViewController.m b/bin/templates/project/__PROJECT_NAME__/Classes/MainViewController.m
index 9d690e3..2ca8853 100644
--- a/bin/templates/project/__PROJECT_NAME__/Classes/MainViewController.m
+++ b/bin/templates/project/__PROJECT_NAME__/Classes/MainViewController.m
@@ -87,11 +87,6 @@
 /* Comment out the block below to over-ride */
 
 /*
-- (UIWebView*) newCordovaViewWithFrame:(CGRect)bounds
-{
-    return[super newCordovaViewWithFrame:bounds];
-}
-
 // CB-12098
 #if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000  
 - (NSUInteger)supportedInterfaceOrientations
diff --git a/bin/templates/project/__TEMP__.xcodeproj/project.pbxproj b/bin/templates/project/__TEMP__.xcodeproj/project.pbxproj
index 58bee5d..7a27baf 100755
--- a/bin/templates/project/__TEMP__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__TEMP__.xcodeproj/project.pbxproj
@@ -389,7 +389,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
-				WK_WEB_VIEW_ONLY = 0;
+				WK_WEB_VIEW_ONLY = 1;
 			};
 			name = Debug;
 		};
@@ -429,7 +429,7 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = NO;
-				WK_WEB_VIEW_ONLY = 0;
+				WK_WEB_VIEW_ONLY = 1;
 			};
 			name = Release;
 		};
diff --git a/bin/templates/project/www/index.html b/bin/templates/project/www/index.html
index 646f9cb..65aaede 100755
--- a/bin/templates/project/www/index.html
+++ b/bin/templates/project/www/index.html
@@ -23,7 +23,7 @@
         Customize this policy to fit your own app's needs. For more guidance, see:
             https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy
         Some notes:
-            * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
+            * gap: is required only on iOS (when using WkWebView) and is needed for JS->native communication
             * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
             * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
                 * Enable inline JS: add 'unsafe-inline' to default-src
diff --git a/bin/templates/scripts/cordova/lib/prepare.js b/bin/templates/scripts/cordova/lib/prepare.js
index 441a228..0ae4197 100644
--- a/bin/templates/scripts/cordova/lib/prepare.js
+++ b/bin/templates/scripts/cordova/lib/prepare.js
@@ -34,7 +34,6 @@ const PlatformMunger = require('cordova-common').ConfigChanges.PlatformMunger;
 const PluginInfoProvider = require('cordova-common').PluginInfoProvider;
 const FileUpdater = require('cordova-common').FileUpdater;
 const projectFile = require('./projectFile');
-const xcode = require('xcode');
 
 // launch storyboard and related constants
 const LAUNCHIMAGE_BUILD_SETTING = 'ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME';
@@ -273,7 +272,6 @@ function handleBuildSettings (platformConfig, locations, infoPlist) {
     const deploymentTarget = platformConfig.getPreference('deployment-target', 'ios');
     const needUpdatedBuildSettingsForLaunchStoryboard = checkIfBuildSettingsNeedUpdatedForLaunchStoryboard(platformConfig, infoPlist);
     const swiftVersion = platformConfig.getPreference('SwiftVersion', 'ios');
-    const wkWebViewOnly = platformConfig.getPreference('WKWebViewOnly');
 
     let project;
 
@@ -287,7 +285,7 @@ function handleBuildSettings (platformConfig, locations, infoPlist) {
 
     // no build settings provided and we don't need to update build settings for launch storyboards,
     // then we don't need to parse and update .pbxproj file
-    if (origPkg === pkg && !targetDevice && !deploymentTarget && !needUpdatedBuildSettingsForLaunchStoryboard && !swiftVersion && !wkWebViewOnly) {
+    if (origPkg === pkg && !targetDevice && !deploymentTarget && !needUpdatedBuildSettingsForLaunchStoryboard && !swiftVersion) {
         return Q();
     }
 
@@ -310,22 +308,6 @@ function handleBuildSettings (platformConfig, locations, infoPlist) {
         events.emit('verbose', `Set SwiftVersion to "${swiftVersion}".`);
         project.xcode.updateBuildProperty('SWIFT_VERSION', swiftVersion);
     }
-    if (wkWebViewOnly) {
-        let wkwebviewValue = '1';
-        if (wkWebViewOnly === 'true') {
-            events.emit('verbose', 'Set WK_WEB_VIEW_ONLY.');
-        } else {
-            wkwebviewValue = '0';
-            events.emit('verbose', 'Unset WK_WEB_VIEW_ONLY.');
-        }
-        project.xcode.updateBuildProperty('WK_WEB_VIEW_ONLY', wkwebviewValue);
-        const cordovaLibXcodePath = path.join(locations.root, 'CordovaLib', 'CordovaLib.xcodeproj');
-        const pbxPath = path.join(cordovaLibXcodePath, 'project.pbxproj');
-        const xcodeproj = xcode.project(pbxPath);
-        xcodeproj.parseSync();
-        xcodeproj.updateBuildProperty('WK_WEB_VIEW_ONLY', wkwebviewValue);
-        fs.writeFileSync(pbxPath, xcodeproj.writeSync());
-    }
 
     updateBuildSettingsForLaunchStoryboard(project.xcode, platformConfig, infoPlist);
 
diff --git a/cordova-js-src/exec.js b/cordova-js-src/exec.js
index 422582e..466220d 100644
--- a/cordova-js-src/exec.js
+++ b/cordova-js-src/exec.js
@@ -19,19 +19,13 @@
  *
 */
 
-/* global require, module, atob, document */
-
 /**
- * Creates a gap bridge iframe used to notify the native code about queued
+ * Creates the exec bridge used to notify the native code of
  * commands.
  */
 var cordova = require('cordova');
 var utils = require('cordova/utils');
 var base64 = require('cordova/base64');
-var execIframe;
-var commandQueue = []; // Contains pending JS->Native messages.
-var isInContextOfEvalJs = 0;
-var failSafeTimerId = 0;
 
 function massageArgsJsToNative (args) {
     if (!args || utils.typeName(args) !== 'Array') {
@@ -61,7 +55,7 @@ function massageMessageNativeToJs (message) {
             return ret.buffer;
         };
         var base64ToArrayBuffer = function (b64) {
-            return stringToArrayBuffer(atob(b64));
+            return stringToArrayBuffer(atob(b64)); // eslint-disable-line no-undef
         };
         message = base64ToArrayBuffer(message.data);
     }
@@ -82,7 +76,7 @@ function convertMessageToArgsNativeToJs (message) {
     return args;
 }
 
-function iOSExec () {
+var iOSExec = function () {
     var successCallback, failCallback, service, action, actionArgs;
     var callbackId = null;
     if (typeof arguments[0] !== 'string') {
@@ -99,9 +93,8 @@ function iOSExec () {
         // an invalid callbackId and passes it even if no callbacks were given.
         callbackId = 'INVALID';
     } else {
-        throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' +
-            'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);'
-        );
+   	    throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + // eslint-disable-line
+            'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);');
     }
 
     // If actionArgs is not provided, default to an empty array
@@ -117,120 +110,25 @@ function iOSExec () {
 
     actionArgs = massageArgsJsToNative(actionArgs);
 
-    var command = [callbackId, service, action, actionArgs];
-
-    // Stringify and queue the command. We stringify to command now to
-    // effectively clone the command arguments in case they are mutated before
-    // the command is executed.
-    commandQueue.push(JSON.stringify(command));
-
-    // If we're in the context of a stringByEvaluatingJavaScriptFromString call,
-    // then the queue will be flushed when it returns; no need for a poke.
-    // Also, if there is already a command in the queue, then we've already
-    // poked the native side, so there is no reason to do so again.
-    if (!isInContextOfEvalJs && commandQueue.length === 1) {
-        pokeNative();
-    }
-}
-
-// CB-10530
-function proxyChanged () {
-    var cexec = cordovaExec();
-
-    return (execProxy !== cexec && // proxy objects are different
-            iOSExec !== cexec // proxy object is not the current iOSExec
-    );
-}
-
-// CB-10106
-function handleBridgeChange () {
-    if (proxyChanged()) {
-        var commandString = commandQueue.shift();
-        while (commandString) {
-            var command = JSON.parse(commandString);
-            var callbackId = command[0];
-            var service = command[1];
-            var action = command[2];
-            var actionArgs = command[3];
-            var callbacks = cordova.callbacks[callbackId] || {};
-
-            execProxy(callbacks.success, callbacks.fail, service, action, actionArgs);
-
-            commandString = commandQueue.shift();
-        }
-        return true;
-    }
-
-    return false;
-}
-
-function pokeNative () {
-    // CB-5488 - Don't attempt to create iframe before document.body is available.
-    if (!document.body) {
-        setTimeout(pokeNative);
-        return;
-    }
-
-    // Check if they've removed it from the DOM, and put it back if so.
-    if (execIframe && execIframe.contentWindow) {
-        execIframe.contentWindow.location = 'gap://ready';
-    } else {
-        execIframe = document.createElement('iframe');
-        execIframe.style.display = 'none';
-        execIframe.src = 'gap://ready';
-        document.body.appendChild(execIframe);
-    }
-    // Use a timer to protect against iframe being unloaded during the poke (CB-7735).
-    // This makes the bridge ~ 7% slower, but works around the poke getting lost
-    // when the iframe is removed from the DOM.
-    // An onunload listener could be used in the case where the iframe has just been
-    // created, but since unload events fire only once, it doesn't work in the normal
-    // case of iframe reuse (where unload will have already fired due to the attempted
-    // navigation of the page).
-    failSafeTimerId = setTimeout(function () {
-        if (commandQueue.length) {
-            // CB-10106 - flush the queue on bridge change
-            if (!handleBridgeChange()) {
-                pokeNative();
-            }
-        }
-    }, 50); // Making this > 0 improves performance (marginally) in the normal case (where it doesn't fire).
-}
-
-iOSExec.nativeFetchMessages = function () {
-    // Stop listing for window detatch once native side confirms poke.
-    if (failSafeTimerId) {
-        clearTimeout(failSafeTimerId);
-        failSafeTimerId = 0;
-    }
-    // Each entry in commandQueue is a JSON string already.
-    if (!commandQueue.length) {
-        return '';
-    }
-    var json = '[' + commandQueue.join(',') + ']';
-    commandQueue.length = 0;
-    return json;
+    // CB-10133 DataClone DOM Exception 25 guard (fast function remover)
+    var command = [callbackId, service, action, JSON.parse(JSON.stringify(actionArgs))];
+    window.webkit.messageHandlers.cordova.postMessage(command);
 };
 
 iOSExec.nativeCallback = function (callbackId, status, message, keepCallback, debug) {
-    return iOSExec.nativeEvalAndFetch(function () {
-        var success = status === 0 || status === 1;
-        var args = convertMessageToArgsNativeToJs(message);
-        function nc2 () {
-            cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
-        }
-        setTimeout(nc2, 0);
+    var success = status === 0 || status === 1;
+    var args = convertMessageToArgsNativeToJs(message);
+    Promise.resolve().then(function () {
+        cordova.callbackFromNative(callbackId, success, status, args, keepCallback); // eslint-disable-line
     });
 };
 
+// for backwards compatibility
 iOSExec.nativeEvalAndFetch = function (func) {
-    // This shouldn't be nested, but better to be safe.
-    isInContextOfEvalJs++;
     try {
         func();
-        return iOSExec.nativeFetchMessages();
-    } finally {
-        isInContextOfEvalJs--;
+    } catch (e) {
+        console.log(e);
     }
 };
 
diff --git a/cordova-js-src/platform.js b/cordova-js-src/platform.js
index 2345fa5..e5a47a0 100644
--- a/cordova-js-src/platform.js
+++ b/cordova-js-src/platform.js
@@ -26,6 +26,10 @@ module.exports = {
         // see the file under plugin/ios/console.js
         require('cordova/modulemapper').clobbers('cordova/plugin/ios/console', 'window.console');
 
+        // Attach the wkwebkit utility to window.WkWebView
+        // see the file under plugin/ios/wkwebkit.js
+        require('cordova/modulemapper').clobbers('cordova/plugin/ios/wkwebkit', 'window.WkWebView');
+
         require('cordova/channel').onNativeReady.fire();
     }
 };
diff --git a/cordova-js-src/platform.js b/cordova-js-src/plugin/ios/wkwebkit.js
similarity index 70%
copy from cordova-js-src/platform.js
copy to cordova-js-src/plugin/ios/wkwebkit.js
index 2345fa5..18f2d32 100644
--- a/cordova-js-src/platform.js
+++ b/cordova-js-src/plugin/ios/wkwebkit.js
@@ -19,13 +19,12 @@
  *
 */
 
-module.exports = {
-    id: 'ios',
-    bootstrap: function () {
-        // Attach the console polyfill that is iOS-only to window.console
-        // see the file under plugin/ios/console.js
-        require('cordova/modulemapper').clobbers('cordova/plugin/ios/console', 'window.console');
+var exec = require('cordova/exec');
 
-        require('cordova/channel').onNativeReady.fire();
+var WkWebKit = {
+    allowsBackForwardNavigationGestures: function (allow) {
+        exec(null, null, 'CDVWebViewEngine', 'allowsBackForwardNavigationGestures', [allow]);
     }
 };
+
+module.exports = WkWebKit;
diff --git a/tests/CordovaLibTests/CDVUserAgentTest.m b/tests/CordovaLibTests/CDVUserAgentTest.m
index d97ae47..116b86a 100644
--- a/tests/CordovaLibTests/CDVUserAgentTest.m
+++ b/tests/CordovaLibTests/CDVUserAgentTest.m
@@ -83,83 +83,6 @@
     [super tearDown];
 }
 
-- (void)testDefaultUserAgent
-{
-    CDVUserAgentTestViewController* rootVc = [[CDVUserAgentTestViewController alloc] init];
-
-    self.appDelegate.window.rootViewController = rootVc;
-
-    // These tests only work on a UIWebView, which is the default web engine
-
-    UIWebView* vc1WebView = (UIWebView*)rootVc.vc1.webView;
-    UIWebView* vc2WebView = (UIWebView*)rootVc.vc2.webView;
-
-    // sanity check
-    if (![vc1WebView isKindOfClass:[UIWebView class]] && ![vc2WebView isKindOfClass:[UIWebView class]]) {
-        return;
-    }
-
-    NSString* getWebUserAgent = @"navigator.userAgent";
-    [self waitForConditionName:@"getting user-agents" block:^BOOL {
-        return vc1WebView.request != nil && vc2WebView.request != nil;
-    }];
-    NSString* webUserAgent = [vc1WebView stringByEvaluatingJavaScriptFromString:getWebUserAgent];
-    NSString* cordovaUserAgent = rootVc.vc1.userAgent;
-
-    XCTAssertTrue([cordovaUserAgent hasPrefix:webUserAgent], @"Default Cordova user agent should be based on navigator.userAgent.");
-}
-
-- (void)testMultipleViews
-{
-    CDVUserAgentTestViewController* rootVc = [[CDVUserAgentTestViewController alloc] init];
-
-    self.appDelegate.window.rootViewController = rootVc;
-
-    UIWebView* vc1WebView = (UIWebView*)rootVc.vc1.webView;
-    UIWebView* vc2WebView = (UIWebView*)rootVc.vc2.webView;
-
-    // sanity check
-    if (![vc1WebView isKindOfClass:[UIWebView class]] && ![vc2WebView isKindOfClass:[UIWebView class]]) {
-        return;
-    }
-
-    NSString* getUserAgentCode = @"navigator.userAgent";
-    [self waitForConditionName:@"getting user-agents" block:^BOOL {
-        return vc1WebView.request != nil && vc2WebView.request != nil;
-    }];
-    NSString* ua1 = [vc1WebView stringByEvaluatingJavaScriptFromString:getUserAgentCode];
-    NSString* ua2 = [vc2WebView stringByEvaluatingJavaScriptFromString:getUserAgentCode];
-
-    XCTAssertTrue([ua1 isEqual:ua2], @"User-Agents should be different.");
-}
-
-- (void)testBaseUserAgent
-{
-    CDVUserAgentTestViewController* rootVc = [[CDVUserAgentTestViewController alloc] init];
-
-    rootVc.vc1.baseUserAgent = @"A different baseline user agent 1";
-    rootVc.vc2.baseUserAgent = @"A different baseline user agent 2";
-
-    self.appDelegate.window.rootViewController = rootVc;
-
-    UIWebView* vc1WebView = (UIWebView*)rootVc.vc1.webView;
-    UIWebView* vc2WebView = (UIWebView*)rootVc.vc2.webView;
-
-    // sanity check
-    if (![vc1WebView isKindOfClass:[UIWebView class]] && ![vc2WebView isKindOfClass:[UIWebView class]]) {
-        return;
-    }
-
-    [self waitForConditionName:@"getting user-agents" block:^BOOL {
-        return vc1WebView.request != nil && vc2WebView.request != nil;
-    }];
-    NSString* cordovaUserAgent1 = rootVc.vc1.userAgent;
-    NSString* cordovaUserAgent2 = rootVc.vc2.userAgent;
-
-    XCTAssertTrue([cordovaUserAgent1 hasPrefix:rootVc.vc1.baseUserAgent], @"Cordova user agent should be based on base user agent.");
-    XCTAssertTrue([cordovaUserAgent2 hasPrefix:rootVc.vc2.baseUserAgent], @"Cordova user agent should be based on base user agent.");
-}
-
 - (void)testUserAgentReleaseLock
 {
     __block NSInteger myLockToken;
diff --git a/tests/CordovaLibTests/CDVWebViewDelegateTests.m b/tests/CordovaLibTests/CDVWebViewDelegateTests.m
index 55b8ecf..d55ab18 100644
--- a/tests/CordovaLibTests/CDVWebViewDelegateTests.m
+++ b/tests/CordovaLibTests/CDVWebViewDelegateTests.m
@@ -19,9 +19,9 @@
 
 #import <XCTest/XCTest.h>
 
-#import <Cordova/CDVUIWebViewDelegate.h>
+#import <Cordova/CDVWebViewDelegate.h>
 
-@interface CDVWebViewDelegate2 : CDVUIWebViewDelegate {}
+@interface CDVWebViewDelegate2 : CDVWebViewDelegate {}
 
 - (void)setState:(NSInteger)state;
 - (NSInteger)state;
@@ -42,13 +42,11 @@
 
 @end
 
-@interface CDVUIWebViewDelegate ()
+@interface CDVWebViewDelegate ()
 
 // expose private interface
 - (BOOL)shouldLoadRequest:(NSURLRequest*)request;
 
--(BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType;
-
 @end
 
 @interface CDVWebViewDelegateTests : XCTestCase
@@ -66,38 +64,9 @@
     [super tearDown];
 }
 
-- (void)testShouldLoadRequestWithStateWaitForStart
-{
-    NSInteger initialState = 1; // STATE_WAITING_FOR_LOAD_START;
-    NSInteger expectedState = 0; // STATE_IDLE;
-    
-    CDVWebViewDelegate2* wvd = [[CDVWebViewDelegate2 alloc] initWithDelegate:nil]; // not really testing delegate handling
-    wvd.state = initialState;
-    
-    // Testing a top-level navigation
-    [wvd webView:[UIWebView new] shouldStartLoadWithRequest:nil navigationType:UIWebViewNavigationTypeLinkClicked];
-    
-    XCTAssertTrue(wvd.state == expectedState, @"If the navigation started with state STATE_WAITING_FOR_LOAD_START then it must fail and the state should be STATE_IDLE");
-}
-
-
-- (void)testFailLoadStateCancelled
-{
-    NSInteger initialState = 1; // STATE_WAITING_FOR_LOAD_START;
-    NSInteger expectedState = 5; // STATE_CANCELLED;
-    NSError* errorCancelled = [NSError errorWithDomain:NSCocoaErrorDomain code:NSURLErrorCancelled userInfo:nil];
-
-    CDVWebViewDelegate2* wvd = [[CDVWebViewDelegate2 alloc] initWithDelegate:nil]; // not really testing delegate handling
-
-    wvd.state = initialState;
-    [wvd webView:[UIWebView new] didFailLoadWithError:errorCancelled];
-
-    XCTAssertTrue(wvd.state == expectedState, @"If the load error was through an iframe redirect (NSURLErrorCancelled), the state should be STATE_CANCELLED");
-}
-
 - (void)testShouldLoadRequest
 {
-    CDVUIWebViewDelegate* wvd = [[CDVUIWebViewDelegate alloc] initWithDelegate:nil]; // not really testing delegate handling
+    CDVWebViewDelegate* wvd = [[CDVWebViewDelegate alloc] initWithDelegate:nil]; // not really testing delegate handling
 
     NSURLRequest* mailtoUrl = [NSURLRequest requestWithURL:[NSURL URLWithString:@"mailto:dev@cordova.apache.org"]];
     NSURLRequest* telUrl = [NSURLRequest requestWithURL:[NSURL URLWithString:@"tel:12345"]];
@@ -132,7 +101,7 @@
 
 - (void)doTestFragmentIdentifiersWithBaseUrl:(NSString*)baseUrl fragment:(NSString*)fragment
 {
-    CDVUIWebViewDelegate* wvd = [[CDVUIWebViewDelegate alloc] initWithDelegate:nil]; // not really testing delegate handling
+    CDVWebViewDelegate* wvd = [[CDVWebViewDelegate alloc] initWithDelegate:nil]; // not really testing delegate handling
 
     NSString* originalUrlString = baseUrl;
     NSURL* originalUrl = [NSURL URLWithString:originalUrlString];
diff --git a/tests/CordovaLibTests/CDVWebViewEngineTest.m b/tests/CordovaLibTests/CDVWebViewEngineTest.m
new file mode 100644
index 0000000..a251b59
--- /dev/null
+++ b/tests/CordovaLibTests/CDVWebViewEngineTest.m
@@ -0,0 +1,227 @@
+/*
+ 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 <XCTest/XCTest.h>
+#import "CDVWebViewEngine.h"
+#import "CDVWebViewProcessPoolFactory.h"
+#import <Cordova/NSDictionary+CordovaPreferences.h>
+#import <Cordova/CDVAvailability.h>
+
+@interface CDVWebViewEngineTest : XCTestCase
+
+@property (nonatomic, strong) CDVWebViewEngine* plugin;
+@property (nonatomic, strong) CDVViewController* viewController;
+
+@end
+
+@interface CDVWebViewEngine ()
+
+// TODO: expose private interface, if needed
+- (BOOL)shouldReloadWebView;
+- (BOOL)shouldReloadWebView:(NSURL*)location title:(NSString*)title;
+
+@end
+
+@interface CDVViewController ()
+
+// expose property as readwrite, for test purposes
+@property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
+
+@end
+
+@implementation CDVWebViewEngineTest
+
+- (void)setUp {
+    [super setUp];
+    // Put setup code here. This method is called before the invocation of each test method in the class.
+    
+    // NOTE: no app settings are set, so it will rely on default WKWebViewConfiguration settings
+    self.plugin = [[CDVWebViewEngine alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
+    
+    XCTAssert([self.plugin conformsToProtocol:@protocol(CDVWebViewEngineProtocol)], @"Plugin does not conform to CDVWebViewEngineProtocol");
+}
+
+- (void)tearDown {
+    // Put teardown code here. This method is called after the invocation of each test method in the class.
+    [super tearDown];
+}
+
+- (void) testCanLoadRequest {
+    NSURLRequest* fileUrlRequest = [NSURLRequest requestWithURL:[NSURL fileURLWithPath:@"path/to/file.html"]];
+    NSURLRequest* httpUrlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://apache.org"]];
+    NSURLRequest* miscUrlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"foo://bar"]];
+    id<CDVWebViewEngineProtocol> webViewEngineProtocol = self.plugin;
+    
+    SEL wk_sel = NSSelectorFromString(@"loadFileURL:allowingReadAccessToURL:");
+    if ([self.plugin.engineWebView respondsToSelector:wk_sel]) {
+        XCTAssertTrue([webViewEngineProtocol canLoadRequest:fileUrlRequest]);
+    } else {
+        XCTAssertFalse([webViewEngineProtocol canLoadRequest:fileUrlRequest]);
+    }
+    
+    XCTAssertTrue([webViewEngineProtocol canLoadRequest:httpUrlRequest]);
+    XCTAssertTrue([webViewEngineProtocol canLoadRequest:miscUrlRequest]);
+}
+
+- (void) testUpdateInfo {
+    // Add -ObjC to Other Linker Flags to test project, to load Categories
+    // Update objc test template generator as well
+    
+    id<CDVWebViewEngineProtocol> webViewEngineProtocol = self.plugin;
+    WKWebView* wkWebView = (WKWebView*)self.plugin.engineWebView;
+    
+    // iOS >=10 defaults to NO, < 10 defaults to YES.
+    BOOL mediaPlaybackRequiresUserActionDefault = IsAtLeastiOSVersion(@"10.0")? NO : YES;
+    
+    NSDictionary* preferences = @{
+                               [@"MinimumFontSize" lowercaseString] : @1.1, // default is 0.0
+                               [@"AllowInlineMediaPlayback" lowercaseString] : @YES, // default is NO
+                               [@"MediaPlaybackRequiresUserAction" lowercaseString] : @(!mediaPlaybackRequiresUserActionDefault), // default is NO on iOS >= 10, YES for < 10
+                               [@"SuppressesIncrementalRendering" lowercaseString] : @YES, // default is NO
+                               [@"MediaPlaybackAllowsAirPlay" lowercaseString] : @NO, // default is YES
+                               [@"DisallowOverscroll" lowercaseString] : @YES, // so bounces is to be NO. defaults to NO
+                               [@"WKWebViewDecelerationSpeed" lowercaseString] : @"fast" // default is 'normal'
+                               };
+    NSDictionary* info = @{
+                           kCDVWebViewEngineWebViewPreferences : preferences
+                           };
+    [webViewEngineProtocol updateWithInfo:info];
+    
+    // the only preference we can set, we **can** change this during runtime
+    XCTAssertEqualWithAccuracy(wkWebView.configuration.preferences.minimumFontSize, 1.1, 0.0001);
+    
+    // the WKWebViewConfiguration properties, we **cannot** change outside of initialization
+    if (IsAtLeastiOSVersion(@"10.0")) {
+        XCTAssertFalse(wkWebView.configuration.mediaPlaybackRequiresUserAction);
+    } else {
+        XCTAssertTrue(wkWebView.configuration.mediaPlaybackRequiresUserAction);
+    }
+    XCTAssertFalse(wkWebView.configuration.allowsInlineMediaPlayback);
+    XCTAssertFalse(wkWebView.configuration.suppressesIncrementalRendering);
+    XCTAssertTrue(wkWebView.configuration.mediaPlaybackAllowsAirPlay);
+    
+    // in the test above, DisallowOverscroll is YES, so no bounce
+    if ([wkWebView respondsToSelector:@selector(scrollView)]) {
+        XCTAssertFalse(((UIScrollView*)[wkWebView scrollView]).bounces);
+    } else {
+        for (id subview in wkWebView.subviews) {
+            if ([[subview class] isSubclassOfClass:[UIScrollView class]]) {
+                XCTAssertFalse(((UIScrollView*)subview).bounces = NO);
+            }
+        }
+    }
+    
+    XCTAssertTrue(wkWebView.scrollView.decelerationRate == UIScrollViewDecelerationRateFast);
+}
+
+- (void) testConfigurationFromSettings {
+    // we need to re-set the plugin from the "setup" to take in the app settings we need
+    self.plugin = [[CDVWebViewEngine alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
+    self.viewController = [[CDVViewController alloc] init];
+    
+    // generate the app settings
+    // iOS >=10 defaults to NO, < 10 defaults to YES.
+    BOOL mediaPlaybackRequiresUserActionDefault = IsAtLeastiOSVersion(@"10.0")? NO : YES;
+
+    NSDictionary* settings = @{
+                                  [@"MinimumFontSize" lowercaseString] : @1.1, // default is 0.0
+                                  [@"AllowInlineMediaPlayback" lowercaseString] : @YES, // default is NO
+                                  [@"MediaPlaybackRequiresUserAction" lowercaseString] : @(!mediaPlaybackRequiresUserActionDefault), // default is NO on iOS >= 10, YES for < 10
+                                  [@"SuppressesIncrementalRendering" lowercaseString] : @YES, // default is NO
+                                  [@"MediaPlaybackAllowsAirPlay" lowercaseString] : @NO, // default is YES
+                                  [@"DisallowOverscroll" lowercaseString] : @YES, // so bounces is to be NO. defaults to NO
+                                  [@"WKWebViewDecelerationSpeed" lowercaseString] : @"fast" // default is 'normal'
+                                  };
+    // this can be set because of the Category at the top of the file
+    self.viewController.settings = [settings mutableCopy];
+    
+    // app settings are read after you register the plugin
+    [self.viewController registerPlugin:self.plugin withClassName:NSStringFromClass([self.plugin class])];
+    XCTAssert([self.plugin conformsToProtocol:@protocol(CDVWebViewEngineProtocol)], @"Plugin does not conform to CDVWebViewEngineProtocol");
+    
+    // after registering (thus plugin initialization), we can grab the webview configuration
+    WKWebView* wkWebView = (WKWebView*)self.plugin.engineWebView;
+    
+    // the only preference we can set, we **can** change this during runtime
+    XCTAssertEqualWithAccuracy(wkWebView.configuration.preferences.minimumFontSize, 1.1, 0.0001);
+    
+    // the WKWebViewConfiguration properties, we **cannot** change outside of initialization
+    if (IsAtLeastiOSVersion(@"10.0")) {
+        XCTAssertTrue(wkWebView.configuration.mediaPlaybackRequiresUserAction);
+    } else {
+        XCTAssertFalse(wkWebView.configuration.mediaPlaybackRequiresUserAction);
+    }
+    XCTAssertTrue(wkWebView.configuration.allowsInlineMediaPlayback);
+    XCTAssertTrue(wkWebView.configuration.suppressesIncrementalRendering);
+    // The test case below is in a separate test "testConfigurationWithMediaPlaybackAllowsAirPlay" (Apple bug)
+    // XCTAssertFalse(wkWebView.configuration.mediaPlaybackAllowsAirPlay);
+    
+    // in the test above, DisallowOverscroll is YES, so no bounce
+    if ([wkWebView respondsToSelector:@selector(scrollView)]) {
+        XCTAssertFalse(((UIScrollView*)[wkWebView scrollView]).bounces);
+    } else {
+        for (id subview in wkWebView.subviews) {
+            if ([[subview class] isSubclassOfClass:[UIScrollView class]]) {
+                XCTAssertFalse(((UIScrollView*)subview).bounces = NO);
+            }
+        }
+    }
+    
+    XCTAssertTrue(wkWebView.scrollView.decelerationRate == UIScrollViewDecelerationRateFast);
+}
+
+- (void) testShouldReloadWebView {
+    WKWebView* wkWebView = (WKWebView*)self.plugin.engineWebView;
+    
+    NSURL* about_blank = [NSURL URLWithString:@"about:blank"];
+    NSURL* real_site = [NSURL URLWithString:@"https://cordova.apache.org"];
+    NSString* empty_title_document = @"<html><head><title></title></head></html>";
+    
+    // about:blank should reload
+    [wkWebView loadRequest:[NSURLRequest requestWithURL:about_blank]];
+    XCTAssertTrue([self.plugin shouldReloadWebView]);
+
+    // a network location should *not* reload
+    [wkWebView loadRequest:[NSURLRequest requestWithURL:real_site]];
+    XCTAssertFalse([self.plugin shouldReloadWebView]);
+    
+    // document with empty title should *not* reload
+    // baseURL:nil results in about:blank, so we use a dummy here
+    [wkWebView loadHTMLString:empty_title_document baseURL:[NSURL URLWithString:@"about:"]];
+    XCTAssertFalse([self.plugin shouldReloadWebView]);
+
+    // Anecdotal assertion that when the WKWebView process has died,
+    // the title is nil, should always reload
+    XCTAssertTrue([self.plugin shouldReloadWebView:about_blank title:nil]);
+    XCTAssertTrue([self.plugin shouldReloadWebView:real_site title:nil]);
+    
+    // about:blank should always reload
+    XCTAssertTrue([self.plugin shouldReloadWebView:about_blank title:@"some title"]);
+    
+    // non about:blank with a non-nil title should **not** reload
+    XCTAssertFalse([self.plugin shouldReloadWebView:real_site title:@""]);
+}
+
+- (void) testWKProcessPoolFactory {
+    WKProcessPool* shared = [[CDVWebViewProcessPoolFactory sharedFactory] sharedProcessPool];
+    XCTAssertTrue(shared != nil);
+}
+
+@end
diff --git a/tests/CordovaLibTests/CDVWebViewTest.h b/tests/CordovaLibTests/CDVWebViewTest.h
index e11b825..f81e0a6 100644
--- a/tests/CordovaLibTests/CDVWebViewTest.h
+++ b/tests/CordovaLibTests/CDVWebViewTest.h
@@ -17,27 +17,13 @@
  under the License.
  */
 
-#import <XCTest/XCTest.h>
-#import <UIKit/UIKit.h>
+#import <WebKit/WebKit.h>
+#import <Cordova/CDV.h>
 
-@class AppDelegate;
-@class CDVViewController;
+@interface CDVWebViewEngine : CDVPlugin <CDVWebViewEngineProtocol, WKScriptMessageHandler, WKNavigationDelegate>
 
-@interface CDVWebViewTest : XCTestCase
+@property (nonatomic, strong, readonly) id <WKUIDelegate> uiDelegate;
 
-@property (nonatomic, strong) UIWebView* webView;
+(void)allowsBackForwardNavigationGestures:(CDVInvokedUrlCommand*)command;
 
-- (AppDelegate*)appDelegate;
-- (CDVViewController*)viewController;
-- (UIWebView*)webView;
-
-// Returns the already registered plugin object for the given class.
-- (id)pluginInstance:(NSString*)pluginName;
-// Destroys the existing webview and creates a new one.
-- (void)reloadWebView;
-// Runs the run loop until the given block returns true, or until a timeout
-// occurs.
-- (void)waitForConditionName:(NSString*)conditionName block:(BOOL (^)())block;
-// Convenience function for stringByEvaluatingJavaScriptFromString.
-- (NSString*)evalJs:(NSString*)code;
 @end
diff --git a/tests/CordovaLibTests/CDVWebViewTest.m b/tests/CordovaLibTests/CDVWebViewTest.m
index 02513c1..111ab9e 100644
--- a/tests/CordovaLibTests/CDVWebViewTest.m
+++ b/tests/CordovaLibTests/CDVWebViewTest.m
@@ -69,11 +69,6 @@
     return self.appDelegate.viewController;
 }
 
-- (UIWebView*)webView
-{
-    return (UIWebView*)self.viewController.webView;
-}
-
 - (id)pluginInstance:(NSString*)pluginName
 {
     id ret = [self.viewController getCommandInstance:pluginName];
diff --git a/tests/CordovaLibTests/CDVWhitelistTests.m b/tests/CordovaLibTests/CDVWhitelistTests.m
index 5d50aaa..bd25418 100644
--- a/tests/CordovaLibTests/CDVWhitelistTests.m
+++ b/tests/CordovaLibTests/CDVWhitelistTests.m
@@ -300,32 +300,6 @@
     NSURL* telUrl = [NSURL URLWithString:@"tel:5555555"];
     NSMutableURLRequest* telRequest = [NSMutableURLRequest requestWithURL:telUrl];
     telRequest.mainDocumentURL = telUrl;
-    
-    // mainDocumentURL and URL are the same in the NSURLRequest
-    // Only UIWebViewNavigationTypeLinkClicked and UIWebViewNavigationTypeOther should return YES
-    XCTAssertTrue([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeLinkClicked]);
-    XCTAssertTrue([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeOther]);
-    XCTAssertFalse([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeReload]);
-    XCTAssertFalse([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeBackForward]);
-    XCTAssertFalse([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeFormSubmitted]);
-    XCTAssertFalse([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeFormResubmitted]);
-    
-    telRequest.mainDocumentURL = nil;
-    // mainDocumentURL and URL are not the same in the NSURLRequest
-    // Only UIWebViewNavigationTypeLinkClicked should return YES
-    XCTAssertTrue([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeLinkClicked]);
-    XCTAssertFalse([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeOther]);
-    XCTAssertFalse([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeReload]);
-    XCTAssertFalse([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeBackForward]);
-    XCTAssertFalse([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeFormSubmitted]);
-    XCTAssertFalse([CDVIntentAndNavigationFilter shouldOpenURLRequest:telRequest navigationType:UIWebViewNavigationTypeFormResubmitted]);
-    
-    NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://apache.org"]];
-    // Only CDVIntentAndNavigationFilterValueNavigationAllowed should return YES
-    // navigationType doesn't matter
-    XCTAssertTrue([CDVIntentAndNavigationFilter shouldOverrideLoadWithRequest:request navigationType:UIWebViewNavigationTypeOther filterValue:CDVIntentAndNavigationFilterValueNavigationAllowed]);
-    XCTAssertFalse([CDVIntentAndNavigationFilter shouldOverrideLoadWithRequest:request navigationType:UIWebViewNavigationTypeOther filterValue:CDVIntentAndNavigationFilterValueIntentAllowed]);
-    XCTAssertFalse([CDVIntentAndNavigationFilter shouldOverrideLoadWithRequest:request navigationType:UIWebViewNavigationTypeOther filterValue:CDVIntentAndNavigationFilterValueNoneAllowed]);
 }
 
 
diff --git a/tests/CordovaLibTests/CordovaLibApp/AppDelegate.m b/tests/CordovaLibTests/CordovaLibApp/AppDelegate.m
index 5b26110..9888448 100644
--- a/tests/CordovaLibTests/CordovaLibApp/AppDelegate.m
+++ b/tests/CordovaLibTests/CordovaLibApp/AppDelegate.m
@@ -25,8 +25,6 @@
 
 - (void)createViewController
 {
-    NSAssert(!self.viewController, @"ViewController already created.");
-
     self.viewController = [[ViewController alloc] init];
     self.viewController.wwwFolderName = @"www";
     self.viewController.startPage = @"index.html";
diff --git a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
index fb6f059..e9eeef3 100644
--- a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
+++ b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj
@@ -14,15 +14,13 @@
 		303A4078152124BB00182201 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 303A4077152124BB00182201 /* AppDelegate.m */; };
 		303A407B152124BB00182201 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 303A407A152124BB00182201 /* ViewController.m */; };
 		30610C9219AD9B95000B3781 /* CDVCommandDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 30610C9119AD9B95000B3781 /* CDVCommandDelegateTests.m */; };
-		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 */; };
 		30F8AE1D152129DA006625B3 /* www in Resources */ = {isa = PBXBuildFile; fileRef = 30F8AE1C152129DA006625B3 /* www */; };
+		4E23F90223E175AD006CD852 /* CDVWebViewEngineTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E23F90123E175AD006CD852 /* CDVWebViewEngineTest.m */; };
 		5C4C91761C2ACE450055AFC3 /* CDVViewControllerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C4C91751C2ACE450055AFC3 /* CDVViewControllerTest.m */; };
 		5C4C917B1C2AD44E0055AFC3 /* config-custom.xml in Resources */ = {isa = PBXBuildFile; fileRef = 5C4C91771C2ACF130055AFC3 /* config-custom.xml */; };
 		686357B5141002F200DF4CF2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 686357B3141002F200DF4CF2 /* InfoPlist.strings */; };
 		686357BA141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 686357B9141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m */; };
-		7E91406017711D88002C6A3F /* CDVWebViewDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E91405F17711D88002C6A3F /* CDVWebViewDelegateTests.m */; };
 		7EF33BD71911ABA20048544E /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EF33BD61911ABA20048544E /* Default-568h@2x.png */; };
 		C0FA7C9B1E4BB6420077B045 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 303A4073152124BB00182201 /* main.m */; };
 		C0FA7C9C1E4BB6420077B045 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 303A4077152124BB00182201 /* AppDelegate.m */; };
@@ -34,24 +32,17 @@
 		C0FA7CA51E4BB6420077B045 /* config-custom.xml in Resources */ = {isa = PBXBuildFile; fileRef = 5C4C91771C2ACF130055AFC3 /* config-custom.xml */; };
 		C0FA7CB51E4BBBBE0077B045 /* CDVWhitelistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 30356213141049E1006C2D43 /* CDVWhitelistTests.m */; };
 		C0FA7CB61E4BBBBE0077B045 /* CDVPluginResultJSONSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 686357B9141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m */; };
-		C0FA7CB71E4BBBBE0077B045 /* CDVLocalStorageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D1AD151D4D9D000D9128 /* CDVLocalStorageTests.m */; };
-		C0FA7CB81E4BBBBE0077B045 /* CDVWebViewTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B342F415224B360070E6A5 /* CDVWebViewTest.m */; };
 		C0FA7CB91E4BBBBE0077B045 /* CDVBase64Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 30D1B08B15A2B36D0060C291 /* CDVBase64Tests.m */; };
 		C0FA7CBA1E4BBBBE0077B045 /* CDVFakeFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3554515A731F100F4DE24 /* CDVFakeFileManager.m */; };
 		C0FA7CBB1E4BBBBE0077B045 /* CDVViewControllerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C4C91751C2ACE450055AFC3 /* CDVViewControllerTest.m */; };
 		C0FA7CBC1E4BBBBE0077B045 /* CDVInvokedUrlCommandTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EB89634915FE66EA00E12277 /* CDVInvokedUrlCommandTests.m */; };
-		C0FA7CBD1E4BBBBE0077B045 /* CDVUserAgentTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EB96677116ADBCF500D86CDF /* CDVUserAgentTest.m */; };
-		C0FA7CBE1E4BBBBE0077B045 /* CDVWebViewDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E91405F17711D88002C6A3F /* CDVWebViewDelegateTests.m */; };
 		C0FA7CBF1E4BBBBE0077B045 /* CDVCommandDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 30610C9119AD9B95000B3781 /* CDVCommandDelegateTests.m */; };
-		C0FA7CC01E4BBBBE0077B045 /* CDVStartPageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA7F20417962CCD001A0CE6 /* CDVStartPageTests.m */; };
 		C0FA7CC31E4BBBBE0077B045 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 686357B3141002F200DF4CF2 /* InfoPlist.strings */; };
 		C0FA7CCE1E4BBE400077B045 /* Cordova.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0FA7CAC1E4BB6B30077B045 /* Cordova.framework */; };
 		C0FA7CDB1E4BC4FE0077B045 /* Cordova.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0FA7CAC1E4BB6B30077B045 /* Cordova.framework */; };
 		C0FA7CDD1E4BC5020077B045 /* Cordova.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C0FA7CAC1E4BB6B30077B045 /* Cordova.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		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 */; };
-		EBA7F20517962CCD001A0CE6 /* CDVStartPageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA7F20417962CCD001A0CE6 /* CDVStartPageTests.m */; };
 		F8EB14D1165FFD3200616F39 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = F8EB14D0165FFD3200616F39 /* config.xml */; };
 /* End PBXBuildFile section */
 
@@ -98,27 +89,22 @@
 		303A4079152124BB00182201 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
 		303A407A152124BB00182201 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
 		30610C9119AD9B95000B3781 /* CDVCommandDelegateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVCommandDelegateTests.m; sourceTree = "<group>"; };
-		3062D1AD151D4D9D000D9128 /* CDVLocalStorageTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVLocalStorageTests.m; sourceTree = "<group>"; };
-		30B342F415224B360070E6A5 /* CDVWebViewTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewTest.m; sourceTree = "<group>"; };
 		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>"; };
+		4E23F90123E175AD006CD852 /* CDVWebViewEngineTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewEngineTest.m; sourceTree = "<group>"; };
 		5C4C91751C2ACE450055AFC3 /* CDVViewControllerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVViewControllerTest.m; sourceTree = "<group>"; };
 		5C4C91771C2ACF130055AFC3 /* config-custom.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "config-custom.xml"; sourceTree = "<group>"; };
 		686357A9141002F100DF4CF2 /* CordovaLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CordovaLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
 		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>"; };
-		7E91405F17711D88002C6A3F /* CDVWebViewDelegateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewDelegateTests.m; sourceTree = "<group>"; };
 		7EF33BD61911ABA20048544E /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
 		C0FA7CAA1E4BB6420077B045 /* CordovaFrameworkApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CordovaFrameworkApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		C0FA7CAC1E4BB6B30077B045 /* Cordova.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cordova.framework; path = "../Debug-iphonesimulator/Cordova.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
 		C0FA7CC71E4BBBBE0077B045 /* CordovaFrameworkTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CordovaFrameworkTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
 		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>"; };
 /* End PBXFileReference section */
@@ -228,19 +214,14 @@
 		EB3B34F4161B585D003DBE7D /* CordovaLibTests */ = {
 			isa = PBXGroup;
 			children = (
+				4E23F90123E175AD006CD852 /* CDVWebViewEngineTest.m */,
 				30D1B08B15A2B36D0060C291 /* CDVBase64Tests.m */,
 				30610C9119AD9B95000B3781 /* CDVCommandDelegateTests.m */,
 				EBA3554415A731F100F4DE24 /* CDVFakeFileManager.h */,
 				EBA3554515A731F100F4DE24 /* CDVFakeFileManager.m */,
 				EB89634915FE66EA00E12277 /* CDVInvokedUrlCommandTests.m */,
-				3062D1AD151D4D9D000D9128 /* CDVLocalStorageTests.m */,
 				686357B9141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m */,
-				EBA7F20417962CCD001A0CE6 /* CDVStartPageTests.m */,
-				EB96677116ADBCF500D86CDF /* CDVUserAgentTest.m */,
 				5C4C91751C2ACE450055AFC3 /* CDVViewControllerTest.m */,
-				7E91405F17711D88002C6A3F /* CDVWebViewDelegateTests.m */,
-				EBA3550F15A5F18900F4DE24 /* CDVWebViewTest.h */,
-				30B342F415224B360070E6A5 /* CDVWebViewTest.m */,
 				30356213141049E1006C2D43 /* CDVWhitelistTests.m */,
 				686357B1141002F200DF4CF2 /* Supporting Files */,
 			);
@@ -455,16 +436,12 @@
 			files = (
 				3035621714104C34006C2D43 /* CDVWhitelistTests.m in Sources */,
 				686357BA141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m in Sources */,
-				3062D1AE151D4D9D000D9128 /* CDVLocalStorageTests.m in Sources */,
-				30B342F515224B360070E6A5 /* CDVWebViewTest.m in Sources */,
 				30D1B08C15A2B36D0060C291 /* CDVBase64Tests.m in Sources */,
 				EBA3554615A731F100F4DE24 /* CDVFakeFileManager.m in Sources */,
+				4E23F90223E175AD006CD852 /* CDVWebViewEngineTest.m in Sources */,
 				5C4C91761C2ACE450055AFC3 /* CDVViewControllerTest.m in Sources */,
 				EB89634A15FE66EA00E12277 /* CDVInvokedUrlCommandTests.m in Sources */,
-				EB96677216ADBCF500D86CDF /* CDVUserAgentTest.m in Sources */,
-				7E91406017711D88002C6A3F /* CDVWebViewDelegateTests.m in Sources */,
 				30610C9219AD9B95000B3781 /* CDVCommandDelegateTests.m in Sources */,
-				EBA7F20517962CCD001A0CE6 /* CDVStartPageTests.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -484,16 +461,11 @@
 			files = (
 				C0FA7CB51E4BBBBE0077B045 /* CDVWhitelistTests.m in Sources */,
 				C0FA7CB61E4BBBBE0077B045 /* CDVPluginResultJSONSerializationTests.m in Sources */,
-				C0FA7CB71E4BBBBE0077B045 /* CDVLocalStorageTests.m in Sources */,
-				C0FA7CB81E4BBBBE0077B045 /* CDVWebViewTest.m in Sources */,
 				C0FA7CB91E4BBBBE0077B045 /* CDVBase64Tests.m in Sources */,
 				C0FA7CBA1E4BBBBE0077B045 /* CDVFakeFileManager.m in Sources */,
 				C0FA7CBB1E4BBBBE0077B045 /* CDVViewControllerTest.m in Sources */,
 				C0FA7CBC1E4BBBBE0077B045 /* CDVInvokedUrlCommandTests.m in Sources */,
-				C0FA7CBD1E4BBBBE0077B045 /* CDVUserAgentTest.m in Sources */,
-				C0FA7CBE1E4BBBBE0077B045 /* CDVWebViewDelegateTests.m in Sources */,
 				C0FA7CBF1E4BBBBE0077B045 /* CDVCommandDelegateTests.m in Sources */,
-				C0FA7CC01E4BBBBE0077B045 /* CDVStartPageTests.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/tests/spec/unit/fixtures/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/tests/spec/unit/fixtures/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index 5964c8d..4adcabe 100644
--- a/tests/spec/unit/fixtures/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/tests/spec/unit/fixtures/ios-config-xml/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -3,16 +3,22 @@
 	archiveVersion = 1;
 	classes = {
 	};
-	objectVersion = 46;
+	objectVersion = 48;
 	objects = {
 
 /* Begin PBXBuildFile section */
-		30193A501AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 30193A4E1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m */; };
-		30193A511AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30193A4F1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h */; };
+		28BFF9141F355A4E00DDF01A /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BFF9121F355A4E00DDF01A /* CDVLogger.h */; };
+		28BFF9151F355A4E00DDF01A /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 28BFF9131F355A4E00DDF01A /* CDVLogger.m */; };
 		3093E2231B16D6A3003F381A /* CDVIntentAndNavigationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */; };
 		3093E2241B16D6A3003F381A /* CDVIntentAndNavigationFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */; };
+		4E23F8FB23E16E96006CD852 /* CDVWebViewProcessPoolFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E23F8F523E16E96006CD852 /* CDVWebViewProcessPoolFactory.m */; };
+		4E23F8FC23E16E96006CD852 /* CDVWebViewUIDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E23F8F623E16E96006CD852 /* CDVWebViewUIDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		4E23F8FD23E16E96006CD852 /* CDVWebViewUIDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E23F8F723E16E96006CD852 /* CDVWebViewUIDelegate.m */; };
+		4E23F8FE23E16E96006CD852 /* CDVWebViewEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E23F8F823E16E96006CD852 /* CDVWebViewEngine.m */; };
+		4E23F8FF23E16E96006CD852 /* CDVWebViewProcessPoolFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E23F8F923E16E96006CD852 /* CDVWebViewProcessPoolFactory.h */; };
+		4E23F90023E16E96006CD852 /* CDVWebViewEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E23F8FA23E16E96006CD852 /* CDVWebViewEngine.h */; };
+		4E23F90323E17FFA006CD852 /* CDVWebViewUIDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E23F8F623E16E96006CD852 /* CDVWebViewUIDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		7E7F69B61ABA35D8007546F4 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */; };
-		7E7F69B81ABA368F007546F4 /* CDVUIWebViewEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */; };
 		7E7F69B91ABA3692007546F4 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */; };
 		7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF21AB9028C008C4574 /* CDVDebug.h */; };
 		7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */; };
@@ -20,9 +26,6 @@
 		7ED95D051AB9028C008C4574 /* CDVPlugin+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF51AB9028C008C4574 /* CDVPlugin+Private.h */; };
 		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 */; 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 */; 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 */; };
@@ -59,10 +62,38 @@
 		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, ); }; };
 		7ED95D5A1AB9029B008C4574 /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */; };
+		9052DE712150D040008E83D4 /* CDVAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D111AB9029B008C4574 /* CDVAppDelegate.m */; };
+		9052DE722150D040008E83D4 /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D161AB9029B008C4574 /* CDVCommandDelegateImpl.m */; };
+		9052DE732150D040008E83D4 /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D181AB9029B008C4574 /* CDVCommandQueue.m */; };
+		9052DE742150D040008E83D4 /* CDVConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1A1AB9029B008C4574 /* CDVConfigParser.m */; };
+		9052DE752150D040008E83D4 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1C1AB9029B008C4574 /* CDVInvokedUrlCommand.m */; };
+		9052DE762150D040008E83D4 /* CDVPlugin+Resources.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1E1AB9029B008C4574 /* CDVPlugin+Resources.m */; };
+		9052DE772150D040008E83D4 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D201AB9029B008C4574 /* CDVPlugin.m */; };
+		9052DE782150D040008E83D4 /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D221AB9029B008C4574 /* CDVPluginResult.m */; };
+		9052DE792150D040008E83D4 /* CDVTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D251AB9029B008C4574 /* CDVTimer.m */; };
+		9052DE7A2150D040008E83D4 /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D271AB9029B008C4574 /* CDVURLProtocol.m */; };
+		9052DE7B2150D040008E83D4 /* CDVUserAgentUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D291AB9029B008C4574 /* CDVUserAgentUtil.m */; };
+		9052DE7C2150D040008E83D4 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2B1AB9029B008C4574 /* CDVViewController.m */; };
+		9052DE7D2150D040008E83D4 /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */; };
+		9052DE7E2150D040008E83D4 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */; };
+		9052DE7F2150D040008E83D4 /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */; };
+		9052DE802150D040008E83D4 /* CDVJSON_private.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF41AB9028C008C4574 /* CDVJSON_private.m */; };
+		9052DE812150D040008E83D4 /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 28BFF9131F355A4E00DDF01A /* CDVLogger.m */; };
+		9052DE822150D040008E83D4 /* CDVGestureHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */; };
+		9052DE832150D040008E83D4 /* CDVIntentAndNavigationFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */; };
+		9052DE842150D040008E83D4 /* CDVHandleOpenURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF91AB9028C008C4574 /* CDVHandleOpenURL.m */; };
+		9052DE852150D040008E83D4 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CFC1AB9028C008C4574 /* CDVLocalStorage.m */; };
+		9052DE892150D06B008E83D4 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF21AB9028C008C4574 /* CDVDebug.h */; };
+		9052DE8A2150D06B008E83D4 /* CDVJSON_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */; };
+		9052DE8B2150D06B008E83D4 /* CDVPlugin+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF51AB9028C008C4574 /* CDVPlugin+Private.h */; };
+		9052DE8C2150D06B008E83D4 /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BFF9121F355A4E00DDF01A /* CDVLogger.h */; };
+		9052DE8D2150D06B008E83D4 /* CDVGestureHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */; };
+		9052DE8E2150D06B008E83D4 /* CDVIntentAndNavigationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */; };
+		9052DE8F2150D06B008E83D4 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */; };
+		9052DE902150D06B008E83D4 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */; };
 		A3B082D41BB15CEA00D8DC35 /* CDVGestureHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */; };
 		A3B082D51BB15CEA00D8DC35 /* CDVGestureHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */; };
 		C0C01EB61E3911D50056E6CB /* Cordova.h in Headers */ = {isa = PBXBuildFile; fileRef = C0C01EB41E3911D50056E6CB /* Cordova.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		C0C01EBA1E39120F0056E6CB /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 68A32D7114102E1C006B237C /* libCordova.a */; };
 		C0C01EBB1E39131A0056E6CB /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D0F1AB9029B008C4574 /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		C0C01EBC1E39131A0056E6CB /* CDVAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D101AB9029B008C4574 /* CDVAppDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		C0C01EBD1E39131A0056E6CB /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D121AB9029B008C4574 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -84,25 +115,19 @@
 		C0C01ECD1E39131A0056E6CB /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		C0C01ECE1E39131A0056E6CB /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		C0C01ECF1E39131A0056E6CB /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		C0C01ED01E3913610056E6CB /* CDVUIWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
 /* End PBXBuildFile section */
 
-/* Begin PBXContainerItemProxy section */
-		C0C01ED11E39137C0056E6CB /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = D2AAC07D0554694100DB518D;
-			remoteInfo = CordovaLib;
-		};
-/* End PBXContainerItemProxy section */
-
 /* Begin PBXFileReference section */
-		30193A4E1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVUIWebViewNavigationDelegate.m; sourceTree = "<group>"; };
-		30193A4F1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVUIWebViewNavigationDelegate.h; sourceTree = "<group>"; };
-		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
+		28BFF9121F355A4E00DDF01A /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVLogger.h; sourceTree = "<group>"; };
+		28BFF9131F355A4E00DDF01A /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVLogger.m; sourceTree = "<group>"; };
 		3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVIntentAndNavigationFilter.h; sourceTree = "<group>"; };
 		3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVIntentAndNavigationFilter.m; sourceTree = "<group>"; };
+		4E23F8F523E16E96006CD852 /* CDVWebViewProcessPoolFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewProcessPoolFactory.m; sourceTree = "<group>"; };
+		4E23F8F623E16E96006CD852 /* CDVWebViewUIDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewUIDelegate.h; sourceTree = "<group>"; };
+		4E23F8F723E16E96006CD852 /* CDVWebViewUIDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewUIDelegate.m; sourceTree = "<group>"; };
+		4E23F8F823E16E96006CD852 /* CDVWebViewEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewEngine.m; sourceTree = "<group>"; };
+		4E23F8F923E16E96006CD852 /* CDVWebViewProcessPoolFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewProcessPoolFactory.h; sourceTree = "<group>"; };
+		4E23F8FA23E16E96006CD852 /* CDVWebViewEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewEngine.h; sourceTree = "<group>"; };
 		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		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>"; };
@@ -112,10 +137,6 @@
 		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>"; };
@@ -165,7 +186,6 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				C0C01EBA1E39120F0056E6CB /* libCordova.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -186,18 +206,25 @@
 				C0C01EB21E3911D50056E6CB /* Cordova.framework */,
 			);
 			name = Products;
-			sourceTree = CORDOVALIB;
+			sourceTree = "<group>";
 		};
-		0867D691FE84028FC02AAC07 /* CordovaLib */ = {
+		0867D691FE84028FC02AAC07 = {
 			isa = PBXGroup;
 			children = (
 				7ED95D0E1AB9029B008C4574 /* Public */,
 				7ED95CF11AB9028C008C4574 /* Private */,
 				C0C01EB31E3911D50056E6CB /* Cordova */,
 				034768DFFF38A50411DB9C8B /* Products */,
-				30325A0B136B343700982B63 /* VERSION */,
 			);
-			name = CordovaLib;
+			sourceTree = "<group>";
+		};
+		28BFF9111F355A1D00DDF01A /* CDVLogger */ = {
+			isa = PBXGroup;
+			children = (
+				28BFF9121F355A4E00DDF01A /* CDVLogger.h */,
+				28BFF9131F355A4E00DDF01A /* CDVLogger.m */,
+			);
+			path = CDVLogger;
 			sourceTree = "<group>";
 		};
 		3093E2201B16D6A3003F381A /* CDVIntentAndNavigationFilter */ = {
@@ -209,6 +236,19 @@
 			path = CDVIntentAndNavigationFilter;
 			sourceTree = "<group>";
 		};
+		4E23F8F423E16D30006CD852 /* CDVWebViewEngine */ = {
+			isa = PBXGroup;
+			children = (
+				4E23F8FA23E16E96006CD852 /* CDVWebViewEngine.h */,
+				4E23F8F823E16E96006CD852 /* CDVWebViewEngine.m */,
+				4E23F8F923E16E96006CD852 /* CDVWebViewProcessPoolFactory.h */,
+				4E23F8F523E16E96006CD852 /* CDVWebViewProcessPoolFactory.m */,
+				4E23F8F623E16E96006CD852 /* CDVWebViewUIDelegate.h */,
+				4E23F8F723E16E96006CD852 /* CDVWebViewUIDelegate.m */,
+			);
+			path = CDVWebViewEngine;
+			sourceTree = "<group>";
+		};
 		7ED95CF11AB9028C008C4574 /* Private */ = {
 			isa = PBXGroup;
 			children = (
@@ -226,11 +266,12 @@
 		7ED95CF61AB9028C008C4574 /* Plugins */ = {
 			isa = PBXGroup;
 			children = (
+				4E23F8F423E16D30006CD852 /* CDVWebViewEngine */,
+				28BFF9111F355A1D00DDF01A /* CDVLogger */,
 				A3B082D11BB15CEA00D8DC35 /* CDVGestureHandler */,
 				3093E2201B16D6A3003F381A /* CDVIntentAndNavigationFilter */,
 				7ED95CF71AB9028C008C4574 /* CDVHandleOpenURL */,
 				7ED95CFA1AB9028C008C4574 /* CDVLocalStorage */,
-				7ED95CFD1AB9028C008C4574 /* CDVUIWebViewEngine */,
 			);
 			path = Plugins;
 			sourceTree = "<group>";
@@ -253,19 +294,6 @@
 			path = CDVLocalStorage;
 			sourceTree = "<group>";
 		};
-		7ED95CFD1AB9028C008C4574 /* CDVUIWebViewEngine */ = {
-			isa = PBXGroup;
-			children = (
-				30193A4E1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m */,
-				30193A4F1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h */,
-				7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */,
-				7ED95CFF1AB9028C008C4574 /* CDVUIWebViewDelegate.m */,
-				7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */,
-				7ED95D011AB9028C008C4574 /* CDVUIWebViewEngine.m */,
-			);
-			path = CDVUIWebViewEngine;
-			sourceTree = "<group>";
-		};
 		7ED95D0E1AB9029B008C4574 /* Public */ = {
 			isa = PBXGroup;
 			children = (
@@ -335,29 +363,37 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				C0C01EB61E3911D50056E6CB /* Cordova.h in Headers */,
+				C0C01EBB1E39131A0056E6CB /* CDV.h in Headers */,
+				C0C01EBC1E39131A0056E6CB /* CDVAppDelegate.h in Headers */,
+				C0C01EBD1E39131A0056E6CB /* CDVAvailability.h in Headers */,
+				C0C01EBE1E39131A0056E6CB /* CDVAvailabilityDeprecated.h in Headers */,
+				C0C01EBF1E39131A0056E6CB /* CDVCommandDelegate.h in Headers */,
+				C0C01EC01E39131A0056E6CB /* CDVCommandDelegateImpl.h in Headers */,
 				C0C01EC11E39131A0056E6CB /* CDVCommandQueue.h in Headers */,
-				C0C01EC51E39131A0056E6CB /* CDVPlugin.h in Headers */,
-				C0C01ECF1E39131A0056E6CB /* NSMutableArray+QueueAdditions.h in Headers */,
 				C0C01EC21E39131A0056E6CB /* CDVConfigParser.h in Headers */,
-				C0C01EC81E39131A0056E6CB /* CDVTimer.h in Headers */,
-				C0C01EBB1E39131A0056E6CB /* CDV.h in Headers */,
-				C0C01ECE1E39131A0056E6CB /* NSDictionary+CordovaPreferences.h in Headers */,
-				C0C01EB61E3911D50056E6CB /* Cordova.h in Headers */,
+				C0C01EC31E39131A0056E6CB /* CDVInvokedUrlCommand.h in Headers */,
 				C0C01EC41E39131A0056E6CB /* CDVPlugin+Resources.h in Headers */,
-				C0C01EBE1E39131A0056E6CB /* CDVAvailabilityDeprecated.h in Headers */,
+				C0C01EC51E39131A0056E6CB /* CDVPlugin.h in Headers */,
+				C0C01EC61E39131A0056E6CB /* CDVPluginResult.h in Headers */,
+				C0C01EC71E39131A0056E6CB /* CDVScreenOrientationDelegate.h in Headers */,
+				C0C01EC81E39131A0056E6CB /* CDVTimer.h in Headers */,
 				C0C01EC91E39131A0056E6CB /* CDVURLProtocol.h in Headers */,
-				C0C01EBF1E39131A0056E6CB /* CDVCommandDelegate.h in Headers */,
-				C0C01ECD1E39131A0056E6CB /* CDVWhitelist.h in Headers */,
-				C0C01ED01E3913610056E6CB /* CDVUIWebViewDelegate.h in Headers */,
 				C0C01ECA1E39131A0056E6CB /* CDVUserAgentUtil.h in Headers */,
-				C0C01EBC1E39131A0056E6CB /* CDVAppDelegate.h in Headers */,
-				C0C01EBD1E39131A0056E6CB /* CDVAvailability.h in Headers */,
 				C0C01ECB1E39131A0056E6CB /* CDVViewController.h in Headers */,
 				C0C01ECC1E39131A0056E6CB /* CDVWebViewEngineProtocol.h in Headers */,
-				C0C01EC01E39131A0056E6CB /* CDVCommandDelegateImpl.h in Headers */,
-				C0C01EC31E39131A0056E6CB /* CDVInvokedUrlCommand.h in Headers */,
-				C0C01EC71E39131A0056E6CB /* CDVScreenOrientationDelegate.h in Headers */,
-				C0C01EC61E39131A0056E6CB /* CDVPluginResult.h in Headers */,
+				C0C01ECD1E39131A0056E6CB /* CDVWhitelist.h in Headers */,
+				C0C01ECE1E39131A0056E6CB /* NSDictionary+CordovaPreferences.h in Headers */,
+				4E23F90323E17FFA006CD852 /* CDVWebViewUIDelegate.h in Headers */,
+				C0C01ECF1E39131A0056E6CB /* NSMutableArray+QueueAdditions.h in Headers */,
+				9052DE892150D06B008E83D4 /* CDVDebug.h in Headers */,
+				9052DE8A2150D06B008E83D4 /* CDVJSON_private.h in Headers */,
+				9052DE8B2150D06B008E83D4 /* CDVPlugin+Private.h in Headers */,
+				9052DE8C2150D06B008E83D4 /* CDVLogger.h in Headers */,
+				9052DE8D2150D06B008E83D4 /* CDVGestureHandler.h in Headers */,
+				9052DE8E2150D06B008E83D4 /* CDVIntentAndNavigationFilter.h in Headers */,
+				9052DE8F2150D06B008E83D4 /* CDVHandleOpenURL.h in Headers */,
+				9052DE902150D06B008E83D4 /* CDVLocalStorage.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -365,37 +401,38 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */,
-				7ED95D491AB9029B008C4574 /* CDVScreenOrientationDelegate.h in Headers */,
 				7ED95D351AB9029B008C4574 /* CDV.h in Headers */,
-				A3B082D41BB15CEA00D8DC35 /* CDVGestureHandler.h in Headers */,
-				7ED95D3B1AB9029B008C4574 /* CDVCommandDelegateImpl.h in Headers */,
-				7ED95D3D1AB9029B008C4574 /* CDVCommandQueue.h in Headers */,
-				7ED95D531AB9029B008C4574 /* CDVWhitelist.h in Headers */,
 				7ED95D361AB9029B008C4574 /* CDVAppDelegate.h in Headers */,
-				7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */,
 				7ED95D381AB9029B008C4574 /* CDVAvailability.h in Headers */,
-				7ED95D0A1AB9028C008C4574 /* CDVUIWebViewDelegate.h in Headers */,
-				7ED95D471AB9029B008C4574 /* CDVPluginResult.h in Headers */,
-				7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */,
+				7ED95D391AB9029B008C4574 /* CDVAvailabilityDeprecated.h in Headers */,
+				7ED95D3A1AB9029B008C4574 /* CDVCommandDelegate.h in Headers */,
+				7ED95D3B1AB9029B008C4574 /* CDVCommandDelegateImpl.h in Headers */,
+				7ED95D3D1AB9029B008C4574 /* CDVCommandQueue.h in Headers */,
+				4E23F8FF23E16E96006CD852 /* CDVWebViewProcessPoolFactory.h in Headers */,
+				7ED95D3F1AB9029B008C4574 /* CDVConfigParser.h in Headers */,
 				7ED95D411AB9029B008C4574 /* CDVInvokedUrlCommand.h in Headers */,
-				7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */,
+				7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */,
 				7ED95D451AB9029B008C4574 /* CDVPlugin.h in Headers */,
+				7ED95D471AB9029B008C4574 /* CDVPluginResult.h in Headers */,
+				7ED95D491AB9029B008C4574 /* CDVScreenOrientationDelegate.h in Headers */,
+				4E23F8FC23E16E96006CD852 /* CDVWebViewUIDelegate.h in Headers */,
+				7ED95D4A1AB9029B008C4574 /* CDVTimer.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 */,
 				7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */,
-				7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */,
+				7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */,
+				4E23F90023E16E96006CD852 /* CDVWebViewEngine.h in Headers */,
+				7ED95D531AB9029B008C4574 /* CDVWhitelist.h in Headers */,
+				7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */,
+				7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */,
 				7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */,
+				7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */,
 				7ED95D051AB9028C008C4574 /* CDVPlugin+Private.h in Headers */,
-				7E7F69B61ABA35D8007546F4 /* CDVLocalStorage.h in Headers */,
+				28BFF9141F355A4E00DDF01A /* CDVLogger.h in Headers */,
+				A3B082D41BB15CEA00D8DC35 /* CDVGestureHandler.h in Headers */,
 				3093E2231B16D6A3003F381A /* CDVIntentAndNavigationFilter.h in Headers */,
-				7E7F69B81ABA368F007546F4 /* CDVUIWebViewEngine.h in Headers */,
 				7E7F69B91ABA3692007546F4 /* CDVHandleOpenURL.h in Headers */,
-				30193A511AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h in Headers */,
+				7E7F69B61ABA35D8007546F4 /* CDVLocalStorage.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -409,12 +446,10 @@
 				C0C01EAD1E3911D50056E6CB /* Sources */,
 				C0C01EAE1E3911D50056E6CB /* Frameworks */,
 				C0C01EAF1E3911D50056E6CB /* Headers */,
-				C0C01EB01E3911D50056E6CB /* Resources */,
 			);
 			buildRules = (
 			);
 			dependencies = (
-				C0C01ED21E39137C0056E6CB /* PBXTargetDependency */,
 			);
 			name = Cordova;
 			productName = Cordova;
@@ -444,26 +479,26 @@
 		0867D690FE84028FC02AAC07 /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 0720;
+				LastUpgradeCheck = 1010;
 				TargetAttributes = {
 					C0C01EB11E3911D50056E6CB = {
-						CreatedOnToolsVersion = 8.2;
+						CreatedOnToolsVersion = 10.1;
+						ProvisioningStyle = Automatic;
+					};
+					D2AAC07D0554694100DB518D = {
+						CreatedOnToolsVersion = 10.1;
 						ProvisioningStyle = Automatic;
 					};
 				};
 			};
 			buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 1;
+			compatibilityVersion = "Xcode 8.0";
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
 			knownRegions = (
-				English,
-				Japanese,
-				French,
-				German,
 				en,
 			);
-			mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */;
+			mainGroup = 0867D691FE84028FC02AAC07;
 			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
 			projectDirPath = "";
 			projectRoot = "";
@@ -474,21 +509,32 @@
 		};
 /* End PBXProject section */
 
-/* Begin PBXResourcesBuildPhase section */
-		C0C01EB01E3911D50056E6CB /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
 /* Begin PBXSourcesBuildPhase section */
 		C0C01EAD1E3911D50056E6CB /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				9052DE712150D040008E83D4 /* CDVAppDelegate.m in Sources */,
+				9052DE722150D040008E83D4 /* CDVCommandDelegateImpl.m in Sources */,
+				9052DE732150D040008E83D4 /* CDVCommandQueue.m in Sources */,
+				9052DE742150D040008E83D4 /* CDVConfigParser.m in Sources */,
+				9052DE752150D040008E83D4 /* CDVInvokedUrlCommand.m in Sources */,
+				9052DE762150D040008E83D4 /* CDVPlugin+Resources.m in Sources */,
+				9052DE772150D040008E83D4 /* CDVPlugin.m in Sources */,
+				9052DE782150D040008E83D4 /* CDVPluginResult.m in Sources */,
+				9052DE792150D040008E83D4 /* CDVTimer.m in Sources */,
+				9052DE7A2150D040008E83D4 /* CDVURLProtocol.m in Sources */,
+				9052DE7B2150D040008E83D4 /* CDVUserAgentUtil.m in Sources */,
+				9052DE7C2150D040008E83D4 /* CDVViewController.m in Sources */,
+				9052DE7D2150D040008E83D4 /* CDVWhitelist.m in Sources */,
+				9052DE7E2150D040008E83D4 /* NSDictionary+CordovaPreferences.m in Sources */,
+				9052DE7F2150D040008E83D4 /* NSMutableArray+QueueAdditions.m in Sources */,
+				9052DE802150D040008E83D4 /* CDVJSON_private.m in Sources */,
+				9052DE812150D040008E83D4 /* CDVLogger.m in Sources */,
+				9052DE822150D040008E83D4 /* CDVGestureHandler.m in Sources */,
+				9052DE832150D040008E83D4 /* CDVIntentAndNavigationFilter.m in Sources */,
+				9052DE842150D040008E83D4 /* CDVHandleOpenURL.m in Sources */,
+				9052DE852150D040008E83D4 /* CDVLocalStorage.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -496,192 +542,185 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				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 */,
+				7ED95D3E1AB9029B008C4574 /* CDVCommandQueue.m in Sources */,
+				7ED95D401AB9029B008C4574 /* CDVConfigParser.m in Sources */,
 				7ED95D421AB9029B008C4574 /* CDVInvokedUrlCommand.m in Sources */,
+				7ED95D441AB9029B008C4574 /* CDVPlugin+Resources.m in Sources */,
+				7ED95D461AB9029B008C4574 /* CDVPlugin.m in Sources */,
+				7ED95D481AB9029B008C4574 /* CDVPluginResult.m in Sources */,
 				7ED95D4B1AB9029B008C4574 /* CDVTimer.m in Sources */,
+				4E23F8FE23E16E96006CD852 /* CDVWebViewEngine.m in Sources */,
+				7ED95D4D1AB9029B008C4574 /* CDVURLProtocol.m in Sources */,
+				4E23F8FB23E16E96006CD852 /* CDVWebViewProcessPoolFactory.m in Sources */,
 				7ED95D4F1AB9029B008C4574 /* CDVUserAgentUtil.m in Sources */,
-				7ED95D401AB9029B008C4574 /* CDVConfigParser.m in Sources */,
+				7ED95D511AB9029B008C4574 /* CDVViewController.m in Sources */,
+				7ED95D541AB9029B008C4574 /* CDVWhitelist.m in Sources */,
+				7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */,
+				7ED95D5A1AB9029B008C4574 /* NSMutableArray+QueueAdditions.m in Sources */,
+				7ED95D041AB9028C008C4574 /* CDVJSON_private.m in Sources */,
+				4E23F8FD23E16E96006CD852 /* CDVWebViewUIDelegate.m in Sources */,
+				28BFF9151F355A4E00DDF01A /* CDVLogger.m in Sources */,
 				A3B082D51BB15CEA00D8DC35 /* CDVGestureHandler.m in Sources */,
+				3093E2241B16D6A3003F381A /* CDVIntentAndNavigationFilter.m in Sources */,
 				7ED95D071AB9028C008C4574 /* CDVHandleOpenURL.m in Sources */,
-				30193A501AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.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 */,
-				3093E2241B16D6A3003F381A /* CDVIntentAndNavigationFilter.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXSourcesBuildPhase section */
 
-/* Begin PBXTargetDependency section */
-		C0C01ED21E39137C0056E6CB /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = D2AAC07D0554694100DB518D /* CordovaLib */;
-			targetProxy = C0C01ED11E39137C0056E6CB /* PBXContainerItemProxy */;
-		};
-/* End PBXTargetDependency section */
-
 /* Begin XCBuildConfiguration section */
 		1DEB921F08733DC00010E9CD /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				COPY_PHASE_STRIP = NO;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = "";
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
-				PRODUCT_NAME = Cordova;
 				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
 			};
 			name = Debug;
 		};
 		1DEB922008733DC00010E9CD /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = "";
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
-				PRODUCT_NAME = Cordova;
 				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
 			};
 			name = Release;
 		};
 		1DEB922308733DC00010E9CD /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
 				CLANG_WARN_EMPTY_BODY = YES;
 				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				CODE_SIGN_IDENTITY = "";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				ENABLE_TESTABILITY = YES;
-				GCC_C_LANGUAGE_STANDARD = c99;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = "";
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+				MTL_FAST_MATH = YES;
 				ONLY_ACTIVE_ARCH = YES;
-				OTHER_CFLAGS = "-DDEBUG";
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				OTHER_LDFLAGS = "-ObjC";
+				PRODUCT_NAME = Cordova;
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				USER_HEADER_SEARCH_PATHS = "";
 			};
 			name = Debug;
 		};
 		1DEB922408733DC00010E9CD /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
 				CLANG_WARN_EMPTY_BODY = YES;
 				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = "";
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				CODE_SIGN_IDENTITY = "";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
-				ONLY_ACTIVE_ARCH = NO;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				MTL_FAST_MATH = YES;
+				OTHER_LDFLAGS = "-ObjC";
+				PRODUCT_NAME = Cordova;
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
 			};
 			name = Release;
 		};
 		C0C01EB71E3911D50056E6CB /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD)";
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CODE_SIGN_IDENTITY = "";
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 1;
-				DEBUG_INFORMATION_FORMAT = dwarf;
 				DEFINES_MODULE = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				INFOPLIST_FILE = Cordova/Info.plist;
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
-				MTL_ENABLE_DEBUG_INFO = YES;
-				OTHER_LDFLAGS = "-all_load";
 				PRODUCT_BUNDLE_IDENTIFIER = org.apache.cordova.Cordova;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers";
-				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSION_INFO_PREFIX = "";
 			};
@@ -690,46 +729,13 @@
 		C0C01EB81E3911D50056E6CB /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD)";
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CODE_SIGN_IDENTITY = "";
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 1;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEFINES_MODULE = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
-				ENABLE_NS_ASSERTIONS = NO;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				INFOPLIST_FILE = Cordova/Info.plist;
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
-				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_LDFLAGS = "-all_load";
 				PRODUCT_BUNDLE_IDENTIFIER = org.apache.cordova.Cordova;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers";
-				SKIP_INSTALL = YES;
-				VALIDATE_PRODUCT = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSION_INFO_PREFIX = "";
 			};
diff --git a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Classes/MainViewController.m b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Classes/MainViewController.m
index a7d7034..943d4d2 100644
--- a/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Classes/MainViewController.m
+++ b/tests/spec/unit/fixtures/ios-config-xml/SampleApp/Classes/MainViewController.m
@@ -87,11 +87,6 @@
 /* Comment out the block below to over-ride */
 
 /*
-- (UIWebView*) newCordovaViewWithFrame:(CGRect)bounds
-{
-    return[super newCordovaViewWithFrame:bounds];
-}
-
 // CB-12098
 #if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000  
 - (NSUInteger)supportedInterfaceOrientations


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