diff --git a/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m
index 480d6c395..b62f5f818 100644
--- a/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m
+++ b/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m
@@ -266,13 +266,6 @@ - (void)pluginInitialize
[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");
}
@@ -285,37 +278,6 @@ - (void)dispose
[super dispose];
}
-- (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
@@ -566,7 +528,14 @@ - (void)webView:(WKWebView*)theWebView didFailNavigation:(WKNavigation*)navigati
- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView
{
- [webView reload];
+ CDVSettingsDictionary *settings = self.commandDelegate.settings;
+ NSString *recoveryBehavior = [settings cordovaSettingForKey:@"CrashRecoveryBehavior"];
+
+ if ([recoveryBehavior isEqualToString:@"reload"]) {
+ [self.viewController loadStartPage];
+ } else {
+ [webView reload];
+ }
}
- (BOOL)defaultResourcePolicyForURL:(NSURL*)url
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index 5932ea82c..886f9b001 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -382,27 +382,7 @@ - (void)viewDidLoad
[CDVTimer stop:@"TotalPluginStartup"];
}
- // /////////////////
- NSURL* appURL = [self appUrl];
-
- if (appURL) {
- NSURLRequest* appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
- [_webViewEngine loadRequest:appReq];
- } else {
- NSString* loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.webContentFolderName, self.startPage];
- NSLog(@"%@", loadErr);
-
- NSURL* errorUrl = [self errorURL];
- if (errorUrl) {
- errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [loadErr stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLPathAllowedCharacterSet]] relativeToURL:errorUrl];
- NSLog(@"%@", [errorUrl absoluteString]);
- [_webViewEngine loadRequest:[NSURLRequest requestWithURL:errorUrl]];
- } else {
- NSString* html = [NSString stringWithFormat:@"
%@ ", loadErr];
- [_webViewEngine loadHTMLString:html baseURL:nil];
- }
- }
- // /////////////////
+ [self loadStartPage];
[self.webView setBackgroundColor:self.backgroundColor];
[self.launchView setBackgroundColor:self.splashBackgroundColor];
@@ -765,6 +745,29 @@ - (void)createStatusBarView
self.statusBar.hidden = YES;
}
+- (void)loadStartPage
+{
+ NSURL *appURL = [self appUrl];
+
+ if (appURL) {
+ NSURLRequest *appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
+ [_webViewEngine loadRequest:appReq];
+ } else {
+ NSString *loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.webContentFolderName, self.startPage];
+ NSLog(@"%@", loadErr);
+
+ NSURL *errorUrl = [self errorURL];
+ if (errorUrl) {
+ errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [loadErr stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLPathAllowedCharacterSet]] relativeToURL:errorUrl];
+ NSLog(@"%@", [errorUrl absoluteString]);
+ [_webViewEngine loadRequest:[NSURLRequest requestWithURL:errorUrl]];
+ } else {
+ NSString *html = [NSString stringWithFormat:@" %@ ", loadErr];
+ [_webViewEngine loadHTMLString:html baseURL:nil];
+ }
+ }
+}
+
#pragma mark CordovaCommands
- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className
@@ -846,8 +849,7 @@ - (bool)checkAndReinitViewUrl
{
NSURL* appURL = [self appUrl];
if ([self isUrlEmpty: [_webViewEngine URL]] && ![self isUrlEmpty: appURL]) {
- NSURLRequest* appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
- [_webViewEngine loadRequest:appReq];
+ [self loadStartPage];
return true;
}
return false;
diff --git a/CordovaLib/CordovaLib.docc/upgrading-8.md b/CordovaLib/CordovaLib.docc/upgrading-8.md
index 655096d9d..a17529054 100644
--- a/CordovaLib/CordovaLib.docc/upgrading-8.md
+++ b/CordovaLib/CordovaLib.docc/upgrading-8.md
@@ -345,3 +345,5 @@ The following headers are deprecated due to adding global category extensions to
* The ``CDVViewController/showLaunchScreen:`` method is deprecated.
This method has been renamed to ``CDVViewController/showSplashScreen:``.
+
+ * Added a new ``CDVViewController/loadStartPage`` method to load the initial starting page in the web view, replacing any existing content.
diff --git a/CordovaLib/include/Cordova/CDVViewController.h b/CordovaLib/include/Cordova/CDVViewController.h
index f4384bcf6..00cc9e201 100644
--- a/CordovaLib/include/Cordova/CDVViewController.h
+++ b/CordovaLib/include/Cordova/CDVViewController.h
@@ -263,6 +263,15 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (UIView*)newCordovaViewWithFrame:(CGRect)bounds;
+/**
+ Loads the starting page in the web view, replacing any existing content.
+
+ @Metadata {
+ @Available(Cordova, introduced: "8.0.0")
+ }
+ */
+- (void)loadStartPage;
+
/**
Returns the ``CDVPlugin`` instance of the given plugin name, creating the
instance if one does not exist.
diff --git a/tests/CordovaLibTests/CDVWebViewEngineTest.m b/tests/CordovaLibTests/CDVWebViewEngineTest.m
index ee9971d8f..a92392278 100644
--- a/tests/CordovaLibTests/CDVWebViewEngineTest.m
+++ b/tests/CordovaLibTests/CDVWebViewEngineTest.m
@@ -20,30 +20,54 @@ Licensed to the Apache Software Foundation (ASF) under one
#import
#import
#import "CDVWebViewEngine.h"
-#import "CDVWebViewProcessPoolFactory.h"
+#import
#import
#import
+#import "CordovaApp-Swift.h"
+
@interface CDVWebViewEngineTest : XCTestCase
+@property AppDelegate* appDelegate;
@property (nonatomic, strong) CDVWebViewEngine* plugin;
@property (nonatomic, strong) CDVViewController* viewController;
@end
-@interface CDVWebViewEngine ()
+@interface CDVViewController ()
-// TODO: expose private interface, if needed
-- (BOOL)shouldReloadWebView;
-- (BOOL)shouldReloadWebView:(NSURL*)location title:(NSString*)title;
+// expose property as readwrite, for test purposes
+@property (nonatomic, readwrite, strong) CDVSettingsDictionary* settings;
@end
-@interface CDVViewController ()
+@interface TestNavigationDelegate : NSObject
+@property (nonatomic, copy) void (^didFinishNavigation)(WKWebView *, WKNavigation *);
-// expose property as readwrite, for test purposes
-@property (nonatomic, readwrite, strong) CDVSettingsDictionary* settings;
+- (void)waitForDidFinishNavigation:(XCTestExpectation *)expectation;
+@end
+@interface WKWebView ()
+@property (nonatomic, readonly) pid_t _webProcessIdentifier;
+@end
+
+@implementation TestNavigationDelegate
+- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
+{
+ if (_didFinishNavigation)
+ _didFinishNavigation(webView, navigation);
+}
+
+- (void)waitForDidFinishNavigation:(XCTestExpectation *)expectation
+{
+ XCTAssertFalse(self.didFinishNavigation);
+
+ __weak TestNavigationDelegate *weakSelf = self;
+ self.didFinishNavigation = ^(WKWebView *_view, WKNavigation *_nav) {
+ [expectation fulfill];
+ weakSelf.didFinishNavigation = nil;
+ };
+}
@end
@implementation CDVWebViewEngineTest
@@ -52,17 +76,36 @@ - (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)];
+ self.appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+ [self.appDelegate createViewController];
+ self.viewController = self.appDelegate.testViewController;
+
+ self.plugin = (CDVWebViewEngine *)self.viewController.webViewEngine;
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.
+ [self.appDelegate destroyViewController];
[super tearDown];
}
+- (void)waitForDidFinishNavigation:(WKWebView *)webView
+{
+ NSObject *oldNavigationDelegate = webView.navigationDelegate;
+
+ __block XCTestExpectation *expectation = [self expectationWithDescription:@"didFinishNavigation"];
+
+ TestNavigationDelegate *navigationDelegate = [[TestNavigationDelegate alloc] init];
+ webView.navigationDelegate = navigationDelegate;
+ [navigationDelegate waitForDidFinishNavigation:expectation];
+
+ [self waitForExpectations:@[expectation] timeout:5];
+
+ webView.navigationDelegate = oldNavigationDelegate;
+}
+
- (void) testCanLoadRequest {
NSURLRequest* fileUrlRequest = [NSURLRequest requestWithURL:[NSURL fileURLWithPath:@"path/to/file.html"]];
NSURLRequest* httpUrlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://apache.org"]];
@@ -165,7 +208,7 @@ - (void) testConfigurationFromSettings {
} else {
for (id subview in wkWebView.subviews) {
if ([[subview class] isSubclassOfClass:[UIScrollView class]]) {
- XCTAssertFalse(((UIScrollView*)subview).bounces = NO);
+ XCTAssertFalse(((UIScrollView*)subview).bounces == NO);
}
}
}
@@ -173,40 +216,70 @@ - (void) testConfigurationFromSettings {
XCTAssertTrue(wkWebView.scrollView.decelerationRate == UIScrollViewDecelerationRateFast);
}
-- (void) testShouldReloadWebView {
+- (void) testCrashRecoveryRefresh {
WKWebView* wkWebView = (WKWebView*)self.plugin.engineWebView;
+ [self waitForDidFinishNavigation:wkWebView];
- NSURL* about_blank = [NSURL URLWithString:@"about:blank"];
- NSURL* real_site = [NSURL URLWithString:@"https://cordova.apache.org"];
- NSString* empty_title_document = @"";
+ NSString *startPage = @"https://cordova.apache.org/";
+ self.viewController.startPage = startPage;
- // about:blank should reload
- [wkWebView loadRequest:[NSURLRequest requestWithURL:about_blank]];
- XCTAssertTrue([self.plugin shouldReloadWebView]);
+ [self.viewController loadStartPage];
+ [self waitForDidFinishNavigation:wkWebView];
+ XCTAssertTrue([[[self.plugin URL] absoluteString] isEqualToString:startPage]);
- // a network location should *not* reload
- [wkWebView loadRequest:[NSURLRequest requestWithURL:real_site]];
- XCTAssertFalse([self.plugin shouldReloadWebView]);
+ NSURLRequest *nextPage = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://cordova.apache.org/blog/"]];
+ [self.plugin loadRequest:nextPage];
+ [self waitForDidFinishNavigation:wkWebView];
+ XCTAssertFalse([[[self.plugin URL] absoluteString] isEqualToString:startPage]);
- // 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]);
+ pid_t webViewPID = [wkWebView _webProcessIdentifier];
+ kill(webViewPID, 9);
- // 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]);
+ XCTestExpectation *expectation = [self expectationWithDescription:@"Waiting for 10 seconds"];
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+ [expectation fulfill];
+ });
+ [self waitForExpectations:@[expectation] timeout:10.0];
- // about:blank should always reload
- XCTAssertTrue([self.plugin shouldReloadWebView:about_blank title:@"some title"]);
+ XCTAssertFalse([[[self.plugin URL] absoluteString] isEqualToString:startPage]);
+ XCTAssertTrue([[[self.plugin URL] absoluteString] isEqualToString:@"https://cordova.apache.org/blog/"]);
+}
- // non about:blank with a non-nil title should **not** reload
- XCTAssertFalse([self.plugin shouldReloadWebView:real_site title:@""]);
+- (void) testCrashRecoveryReload {
+ WKWebView* wkWebView = (WKWebView*)self.plugin.engineWebView;
+ [self waitForDidFinishNavigation:wkWebView];
+
+ NSString *startPage = @"https://cordova.apache.org/";
+ self.viewController.startPage = startPage;
+ [self.viewController.settings setCordovaSetting:@"reload" forKey:@"CrashRecoveryBehavior"];
+
+ [self.viewController loadStartPage];
+ [self waitForDidFinishNavigation:wkWebView];
+ XCTAssertTrue([[[self.plugin URL] absoluteString] isEqualToString:startPage]);
+
+ NSURLRequest *nextPage = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://cordova.apache.org/blog/"]];
+ [self.plugin loadRequest:nextPage];
+ [self waitForDidFinishNavigation:wkWebView];
+ XCTAssertFalse([[[self.plugin URL] absoluteString] isEqualToString:startPage]);
+
+ pid_t webViewPID = [wkWebView _webProcessIdentifier];
+ kill(webViewPID, 9);
+
+ XCTestExpectation *expectation = [self expectationWithDescription:@"Waiting for 10 seconds"];
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+ [expectation fulfill];
+ });
+ [self waitForExpectations:@[expectation] timeout:10.0];
+
+ XCTAssertTrue([[[self.plugin URL] absoluteString] isEqualToString:startPage]);
}
- (void) testWKProcessPoolFactory {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
WKProcessPool* shared = [[CDVWebViewProcessPoolFactory sharedFactory] sharedProcessPool];
+#pragma clang diagnostic pop
+
XCTAssertTrue(shared != nil);
}
diff --git a/tests/CordovaLibTests/CordovaApp/AppDelegate.swift b/tests/CordovaLibTests/CordovaApp/AppDelegate.swift
index 96b75865b..95308419e 100644
--- a/tests/CordovaLibTests/CordovaApp/AppDelegate.swift
+++ b/tests/CordovaLibTests/CordovaApp/AppDelegate.swift
@@ -22,37 +22,32 @@ import Cordova
@main
@objc class AppDelegate : CDVAppDelegate {
- fileprivate var _window : UIWindow?
fileprivate var _viewController : ViewController?
+ public var testWindow : UIWindow?
+
@objc public var testViewController : CDVViewController? {
return _viewController
}
@objc func createViewController() {
- _viewController = ViewController();
- _viewController?.webContentFolderName = "www";
- _viewController?.startPage = "index.html";
+ _viewController = ViewController()
+ _viewController?.webContentFolderName = "www"
+ _viewController?.startPage = "index.html"
- _window?.rootViewController = _viewController;
- _window?.makeKeyAndVisible();
+ testWindow?.rootViewController = _viewController
+ testWindow?.makeKeyAndVisible()
}
@objc func destroyViewController() {
_viewController = nil
- }
-
- override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
- let retVal = super.application(application, didFinishLaunchingWithOptions:launchOptions);
- let bounds = UIScreen.main.bounds;
- _window = UIWindow(frame: bounds);
- _window?.autoresizesSubviews = true;
-
- if NSClassFromString("CDVWebViewTest") != nil {
- createViewController();
- }
+ testWindow?.rootViewController = UIViewController()
+ }
- return retVal;
+ override func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
+ let configuration = UISceneConfiguration(name:"Default Configuration", sessionRole:connectingSceneSession.role)
+ configuration.delegateClass = SceneDelegate.self
+ return configuration
}
}
diff --git a/tests/CordovaLibTests/CordovaApp/SceneDelegate.swift b/tests/CordovaLibTests/CordovaApp/SceneDelegate.swift
new file mode 100644
index 000000000..215385816
--- /dev/null
+++ b/tests/CordovaLibTests/CordovaApp/SceneDelegate.swift
@@ -0,0 +1,38 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+
+import Cordova
+
+class SceneDelegate: CDVSceneDelegate {
+ override func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
+ guard let windowScene = (scene as? UIWindowScene) else {
+ return
+ }
+
+ let window = UIWindow(windowScene:windowScene)
+ window.rootViewController = UIViewController()
+ window.makeKeyAndVisible()
+
+ self.window = window
+
+ if let appDelegate = (UIApplication.shared.delegate as? AppDelegate) {
+ appDelegate.testWindow = window
+ }
+ }
+}
diff --git a/tests/CordovaLibTests/CordovaApp/ViewController.swift b/tests/CordovaLibTests/CordovaApp/ViewController.swift
index 827ddd305..ed84d18a4 100644
--- a/tests/CordovaLibTests/CordovaApp/ViewController.swift
+++ b/tests/CordovaLibTests/CordovaApp/ViewController.swift
@@ -19,5 +19,19 @@
import Cordova
-class ViewController: CDVViewController {
+class ViewController: CDVViewController, UIScrollViewDelegate {
+ override func viewDidLoad() {
+ let webView = self.newCordovaView(withFrame:CGRect(x: 0, y: 0, width: 400, height: 400))
+ webView.isHidden = true
+ webView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+
+ super.viewDidLoad()
+
+ self.view.addSubview(webView)
+ self.view.sendSubviewToBack(webView)
+
+ if let scrollView = self.webView?.perform(NSSelectorFromString("scrollView")) as? UIScrollView {
+ scrollView.delegate = self
+ }
+ }
}
diff --git a/tests/CordovaLibTests/CordovaApp/config.xml b/tests/CordovaLibTests/CordovaApp/config.xml
index ee69baeb3..ad2d5fde5 100644
--- a/tests/CordovaLibTests/CordovaApp/config.xml
+++ b/tests/CordovaLibTests/CordovaApp/config.xml
@@ -31,6 +31,7 @@
+
diff --git a/tests/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj b/tests/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
index 537ae212c..7e8b8c310 100644
--- a/tests/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
+++ b/tests/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
@@ -31,6 +31,8 @@
905C8BA82CF0756E007EECEF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 905C8BA72CF0756E007EECEF /* AppDelegate.swift */; };
9085EE302CF0617800603B73 /* Cordova.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0FA7CAC1E4BB6B30077B045 /* Cordova.framework */; };
90A775DD2C6F257500FC5BB0 /* CDVSettingsDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 90A775DC2C6F256D00FC5BB0 /* CDVSettingsDictionaryTests.m */; };
+ 90AE8F9C2EBF03F600FF0979 /* CDVWebViewEngineTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E23F90123E175AD006CD852 /* CDVWebViewEngineTest.m */; };
+ 90AE8F9E2EBF0E0700FF0979 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90AE8F9D2EBF0E0300FF0979 /* SceneDelegate.swift */; };
C0FA7CA11E4BB6420077B045 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = F8EB14D0165FFD3200616F39 /* config.xml */; };
C0FA7CA21E4BB6420077B045 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EF33BD61911ABA20048544E /* Default-568h@2x.png */; };
C0FA7CA41E4BB6420077B045 /* www in Resources */ = {isa = PBXBuildFile; fileRef = 30F8AE1C152129DA006625B3 /* www */; };
@@ -89,6 +91,7 @@
905C8BA72CF0756E007EECEF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
9085EE2F2CF05B5900603B73 /* CordovaTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = CordovaTests.xctestplan; sourceTree = ""; };
90A775DC2C6F256D00FC5BB0 /* CDVSettingsDictionaryTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDVSettingsDictionaryTests.m; sourceTree = ""; };
+ 90AE8F9D2EBF0E0300FF0979 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; };
C0FA7CAA1E4BB6420077B045 /* CordovaApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CordovaApp.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 /* CordovaTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CordovaTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -153,6 +156,7 @@
303A406D152124BB00182201 /* CordovaApp */ = {
isa = PBXGroup;
children = (
+ 90AE8F9D2EBF0E0300FF0979 /* SceneDelegate.swift */,
905C8BA72CF0756E007EECEF /* AppDelegate.swift */,
900A9F532CF0677F00FECE7A /* ViewController.swift */,
900A9F592CF0695D00FECE7A /* Plugins */,
@@ -244,7 +248,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
- LastUpgradeCheck = 1620;
+ LastUpgradeCheck = 2610;
TargetAttributes = {
C0FA7CB11E4BBBBE0077B045 = {
TestTargetID = C0FA7C991E4BB6420077B045;
@@ -324,6 +328,7 @@
900A9F5A2CF0696300FECE7A /* SwiftInitPlugin.swift in Sources */,
900A9F542CF0677F00FECE7A /* ViewController.swift in Sources */,
905C8BA82CF0756E007EECEF /* AppDelegate.swift in Sources */,
+ 90AE8F9E2EBF0E0700FF0979 /* SceneDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -332,6 +337,7 @@
buildActionMask = 2147483647;
files = (
C0FA7CB51E4BBBBE0077B045 /* CDVAllowListTests.m in Sources */,
+ 90AE8F9C2EBF03F600FF0979 /* CDVWebViewEngineTest.m in Sources */,
C0FA7CB61E4BBBBE0077B045 /* CDVPluginResultJSONSerializationTests.m in Sources */,
902530FC29A6DC53004AF1CF /* CDVPluginInitTests.m in Sources */,
C0FA7CB91E4BBBBE0077B045 /* CDVBase64Tests.m in Sources */,
@@ -416,6 +422,7 @@
PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
+ STRING_CATALOG_GENERATE_SYMBOLS = YES;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = (
"Classes/**",
@@ -473,6 +480,7 @@
PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
+ STRING_CATALOG_GENERATE_SYMBOLS = YES;
SWIFT_COMPILATION_MODE = wholemodule;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = (
@@ -491,6 +499,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
+ ENABLE_MODULE_VERIFIER = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
@@ -509,6 +518,7 @@
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
MARKETING_VERSION = 1.0;
+ MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++14";
PRODUCT_BUNDLE_IDENTIFIER = "org.apache.cordova.cordovalibapptests.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -527,6 +537,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
+ ENABLE_MODULE_VERIFIER = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
@@ -540,6 +551,7 @@
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
MARKETING_VERSION = 1.0;
+ MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++14";
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PRODUCT_BUNDLE_IDENTIFIER = "org.apache.cordova.cordovalibapptests.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaTestApp.xcscheme b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaTestApp.xcscheme
index 081bc60aa..5d76fec35 100644
--- a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaTestApp.xcscheme
+++ b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaTestApp.xcscheme
@@ -18,7 +18,7 @@
under the License.
-->