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 410ada64 fix(statusbar): Support setting alpha from the JS API (#1661)
410ada64 is described below
commit 410ada64bbc724ae3086690b63759868a2db0009
Author: Darryl Pogue <[email protected]>
AuthorDate: Mon Jun 22 21:51:41 2026 -0700
fix(statusbar): Support setting alpha from the JS API (#1661)
---
.../CDVStatusBarInternal/CDVStatusBarInternal.m | 3 +-
cordova-js-src/plugin/ios/statusbar.js | 2 +-
eslint.config.js | 3 +-
tests/CordovaLibTests/CDVStatusBarTests.m | 184 +++++++++++++++++++++
.../ViewController.swift => CDVTestHelpers.h} | 22 +--
.../ViewController.swift => CDVTestHelpers.m} | 30 ++--
tests/CordovaLibTests/CDVWebViewEngineTest.m | 29 +---
.../CordovaApp/ViewController.swift | 21 ++-
tests/CordovaLibTests/CordovaApp/config.xml | 11 +-
tests/CordovaLibTests/CordovaApp/www/index.html | 9 +-
.../CordovaTests.xcodeproj/project.pbxproj | 56 ++++---
tests/CordovaLibTests/CordovaTests.xctestplan | 1 +
12 files changed, 274 insertions(+), 97 deletions(-)
diff --git
a/CordovaLib/Classes/Private/Plugins/CDVStatusBarInternal/CDVStatusBarInternal.m
b/CordovaLib/Classes/Private/Plugins/CDVStatusBarInternal/CDVStatusBarInternal.m
index cdeaa859..4217cc03 100644
---
a/CordovaLib/Classes/Private/Plugins/CDVStatusBarInternal/CDVStatusBarInternal.m
+++
b/CordovaLib/Classes/Private/Plugins/CDVStatusBarInternal/CDVStatusBarInternal.m
@@ -37,8 +37,9 @@
NSInteger valueR = [[command argumentAtIndex:0 withDefault:@0]
integerValue];
NSInteger valueG = [[command argumentAtIndex:1 withDefault:@0]
integerValue];
NSInteger valueB = [[command argumentAtIndex:2 withDefault:@0]
integerValue];
+ float valueA = [[command argumentAtIndex:3 withDefault:@1.f] floatValue];
- UIColor *bgColor = [UIColor colorWithRed:valueR/255.f green:valueG/255.f
blue:valueB/255.f alpha:1.f];
+ UIColor *bgColor = [UIColor colorWithRed:valueR/255.f green:valueG/255.f
blue:valueB/255.f alpha:valueA];
[self.viewController setStatusBarBackgroundColor:bgColor];
}
diff --git a/cordova-js-src/plugin/ios/statusbar.js
b/cordova-js-src/plugin/ios/statusbar.js
index 5533fd82..63349877 100644
--- a/cordova-js-src/plugin/ios/statusbar.js
+++ b/cordova-js-src/plugin/ios/statusbar.js
@@ -64,7 +64,7 @@ Object.defineProperty(statusBar, 'setBackgroundColor', {
return;
}
- var rgbVals = rgbStr.match(/\d+/g).map(function (v) { return
parseInt(v, 10); });
+ var rgbVals = rgbStr.match(/[\d.]+/g).map(function (v, i) { return (i
< 3) ? parseInt(v, 10) : parseFloat(v); });
if (rgbVals.length < 3) {
return;
}
diff --git a/eslint.config.js b/eslint.config.js
index c7011767..8a77793a 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -26,7 +26,8 @@ module.exports = defineConfig([
globalIgnores([
'**/coverage/',
'templates/project/',
- 'tests/spec/fixtures/'
+ 'tests/spec/fixtures/',
+ 'tests/CordovaLibTests/'
]),
...nodeConfig,
...nodeTestConfig.map(config => ({
diff --git a/tests/CordovaLibTests/CDVStatusBarTests.m
b/tests/CordovaLibTests/CDVStatusBarTests.m
new file mode 100644
index 00000000..db670c73
--- /dev/null
+++ b/tests/CordovaLibTests/CDVStatusBarTests.m
@@ -0,0 +1,184 @@
+/*
+ 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 <Cordova/Cordova.h>
+#import "CDVWebViewEngine.h"
+#import "CordovaApp-Swift.h"
+#import "CDVTestHelpers.h"
+
+@interface CDVStatusBarTests : XCTestCase
+
+@property AppDelegate* appDelegate;
+@property (nonatomic, strong) CDVWebViewEngine* plugin;
+@property (nonatomic, strong) CDVViewController* viewController;
+
+@end
+
+@implementation CDVStatusBarTests
+
+- (void)setUp {
+ [super setUp];
+
+ self.appDelegate = (AppDelegate*)[[UIApplication sharedApplication]
delegate];
+ [self.appDelegate createViewController];
+ self.viewController = self.appDelegate.testViewController;
+
+ self.plugin = (CDVWebViewEngine *)self.viewController.webViewEngine;
+}
+
+- (void)tearDown {
+ [self.appDelegate destroyViewController];
+ [super tearDown];
+}
+
+- (void) testStatusBarBackgroundColorNamedColor {
+ CGFloat rgba[4] = {0.f, 0.f, 0.f, 0.f};
+
+ [self.viewController loadStartPage];
+
+ XCTestExpectation *loadExpectation = [[XCTNSNotificationExpectation alloc]
initWithName:CDVTestingDeviceReadyFired];
+ [self waitForExpectations:@[loadExpectation] timeout:5];
+
+ __block XCTestExpectation *redExpectation = [self
expectationWithDescription:@"red"];
+ [self.plugin
evaluateJavaScript:@"window.statusbar.setBackgroundColor('red');"
completionHandler:^(id _, NSError* error) {
+ XCTAssertNil(error);
+ [redExpectation fulfill];
+ }];
+ [self waitForExpectations:@[redExpectation] timeout:5];
+
+ [self.viewController.statusBarBackgroundColor getRed:&rgba[0]
green:&rgba[1] blue:&rgba[2] alpha:&rgba[3]];
+ XCTAssertEqual(rgba[0], 1.f);
+ XCTAssertEqual(rgba[1], 0.f);
+ XCTAssertEqual(rgba[2], 0.f);
+ XCTAssertEqual(rgba[3], 1.f);
+}
+
+- (void) testStatusBarBackgroundColor3HexColor {
+ CGFloat rgba[4] = {0.f, 0.f, 0.f, 0.f};
+
+ [self.viewController loadStartPage];
+
+ XCTestExpectation *loadExpectation = [[XCTNSNotificationExpectation alloc]
initWithName:CDVTestingDeviceReadyFired];
+ [self waitForExpectations:@[loadExpectation] timeout:5];
+
+ __block XCTestExpectation *redExpectation = [self
expectationWithDescription:@"red"];
+ [self.plugin
evaluateJavaScript:@"window.statusbar.setBackgroundColor('#f00');"
completionHandler:^(id _, NSError* error) {
+ XCTAssertNil(error);
+ [redExpectation fulfill];
+ }];
+ [self waitForExpectations:@[redExpectation] timeout:5];
+
+ [self.viewController.statusBarBackgroundColor getRed:&rgba[0]
green:&rgba[1] blue:&rgba[2] alpha:&rgba[3]];
+ XCTAssertEqual(rgba[0], 1.f);
+ XCTAssertEqual(rgba[1], 0.f);
+ XCTAssertEqual(rgba[2], 0.f);
+ XCTAssertEqual(rgba[3], 1.f);
+}
+
+- (void) testStatusBarBackgroundColor6HexColor {
+ CGFloat rgba[4] = {0.f, 0.f, 0.f, 0.f};
+
+ [self.viewController loadStartPage];
+
+ XCTestExpectation *loadExpectation = [[XCTNSNotificationExpectation alloc]
initWithName:CDVTestingDeviceReadyFired];
+ [self waitForExpectations:@[loadExpectation] timeout:5];
+
+ __block XCTestExpectation *redExpectation = [self
expectationWithDescription:@"red"];
+ [self.plugin
evaluateJavaScript:@"window.statusbar.setBackgroundColor('#ff0000');"
completionHandler:^(id _, NSError* error) {
+ XCTAssertNil(error);
+ [redExpectation fulfill];
+ }];
+ [self waitForExpectations:@[redExpectation] timeout:5];
+
+ [self.viewController.statusBarBackgroundColor getRed:&rgba[0]
green:&rgba[1] blue:&rgba[2] alpha:&rgba[3]];
+ XCTAssertEqual(rgba[0], 1.f);
+ XCTAssertEqual(rgba[1], 0.f);
+ XCTAssertEqual(rgba[2], 0.f);
+ XCTAssertEqual(rgba[3], 1.f);
+}
+
+- (void) testStatusBarBackgroundColor8HexColor {
+ CGFloat rgba[4] = {0.f, 0.f, 0.f, 0.f};
+
+ [self.viewController loadStartPage];
+
+ XCTestExpectation *loadExpectation = [[XCTNSNotificationExpectation alloc]
initWithName:CDVTestingDeviceReadyFired];
+ [self waitForExpectations:@[loadExpectation] timeout:5];
+
+ __block XCTestExpectation *redExpectation = [self
expectationWithDescription:@"red"];
+ [self.plugin
evaluateJavaScript:@"window.statusbar.setBackgroundColor('#ff000080');"
completionHandler:^(id _, NSError* error) {
+ XCTAssertNil(error);
+ [redExpectation fulfill];
+ }];
+ [self waitForExpectations:@[redExpectation] timeout:5];
+
+ [self.viewController.statusBarBackgroundColor getRed:&rgba[0]
green:&rgba[1] blue:&rgba[2] alpha:&rgba[3]];
+ XCTAssertEqual(rgba[0], 1.f);
+ XCTAssertEqual(rgba[1], 0.f);
+ XCTAssertEqual(rgba[2], 0.f);
+ XCTAssertEqual(rgba[3], 0.5f);
+}
+
+- (void) testStatusBarBackgroundColorRGB {
+ CGFloat rgba[4] = {0.f, 0.f, 0.f, 0.f};
+
+ [self.viewController loadStartPage];
+
+ XCTestExpectation *loadExpectation = [[XCTNSNotificationExpectation alloc]
initWithName:CDVTestingDeviceReadyFired];
+ [self waitForExpectations:@[loadExpectation] timeout:5];
+
+ __block XCTestExpectation *redExpectation = [self
expectationWithDescription:@"red"];
+ [self.plugin
evaluateJavaScript:@"window.statusbar.setBackgroundColor('rgb(255, 0, 0)');"
completionHandler:^(id _, NSError* error) {
+ XCTAssertNil(error);
+ [redExpectation fulfill];
+ }];
+ [self waitForExpectations:@[redExpectation] timeout:5];
+
+ [self.viewController.statusBarBackgroundColor getRed:&rgba[0]
green:&rgba[1] blue:&rgba[2] alpha:&rgba[3]];
+ XCTAssertEqual(rgba[0], 1.f);
+ XCTAssertEqual(rgba[1], 0.f);
+ XCTAssertEqual(rgba[2], 0.f);
+ XCTAssertEqual(rgba[3], 1.f);
+}
+
+- (void) testStatusBarBackgroundColorRGBA {
+ CGFloat rgba[4] = {0.f, 0.f, 0.f, 0.f};
+
+ [self.viewController loadStartPage];
+
+ XCTestExpectation *loadExpectation = [[XCTNSNotificationExpectation alloc]
initWithName:CDVTestingDeviceReadyFired];
+ [self waitForExpectations:@[loadExpectation] timeout:5];
+
+ __block XCTestExpectation *redExpectation = [self
expectationWithDescription:@"red"];
+ [self.plugin
evaluateJavaScript:@"window.statusbar.setBackgroundColor('rgba(255, 0, 0,
0.25)');" completionHandler:^(id _, NSError* error) {
+ XCTAssertNil(error);
+ [redExpectation fulfill];
+ }];
+ [self waitForExpectations:@[redExpectation] timeout:5];
+
+ [self.viewController.statusBarBackgroundColor getRed:&rgba[0]
green:&rgba[1] blue:&rgba[2] alpha:&rgba[3]];
+ XCTAssertEqual(rgba[0], 1.f);
+ XCTAssertEqual(rgba[1], 0.f);
+ XCTAssertEqual(rgba[2], 0.f);
+ XCTAssertEqual(rgba[3], 0.25f);
+}
+
+@end
diff --git a/tests/CordovaLibTests/CordovaApp/ViewController.swift
b/tests/CordovaLibTests/CDVTestHelpers.h
similarity index 58%
copy from tests/CordovaLibTests/CordovaApp/ViewController.swift
copy to tests/CordovaLibTests/CDVTestHelpers.h
index 2000194d..42acdf2e 100644
--- a/tests/CordovaLibTests/CordovaApp/ViewController.swift
+++ b/tests/CordovaLibTests/CDVTestHelpers.h
@@ -17,21 +17,13 @@
under the License.
*/
-import Cordova
+#import <WebKit/WebKit.h>
+#import <XCTest/XCTest.h>
-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]
+extern const NSNotificationName CDVTestingDeviceReadyFired;
- super.viewDidLoad()
+@interface TestNavigationDelegate : NSObject <WKNavigationDelegate>
+@property (nonatomic, copy) void (^didFinishNavigation)(WKWebView *,
WKNavigation *);
- self.view.addSubview(webView)
- self.view.sendSubviewToBack(webView)
-
- if let scrollView =
self.webView?.perform(NSSelectorFromString("scrollView")) as? UIScrollView {
- scrollView.delegate = self
- }
- }
-}
+- (void)waitForDidFinishNavigation:(XCTestExpectation *)expectation;
+@end
diff --git a/tests/CordovaLibTests/CordovaApp/ViewController.swift
b/tests/CordovaLibTests/CDVTestHelpers.m
similarity index 56%
copy from tests/CordovaLibTests/CordovaApp/ViewController.swift
copy to tests/CordovaLibTests/CDVTestHelpers.m
index 2000194d..d6b1c06b 100644
--- a/tests/CordovaLibTests/CordovaApp/ViewController.swift
+++ b/tests/CordovaLibTests/CDVTestHelpers.m
@@ -17,21 +17,25 @@
under the License.
*/
-import Cordova
+#import "CDVTestHelpers.h"
-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]
+const NSNotificationName CDVTestingDeviceReadyFired =
@"CDVTestingDeviceReadyFired";
- super.viewDidLoad()
+@implementation TestNavigationDelegate
+- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation
*)navigation
+{
+ if (_didFinishNavigation)
+ _didFinishNavigation(webView, navigation);
+}
- self.view.addSubview(webView)
- self.view.sendSubviewToBack(webView)
+- (void)waitForDidFinishNavigation:(XCTestExpectation *)expectation
+{
+ XCTAssertFalse(self.didFinishNavigation);
- if let scrollView =
self.webView?.perform(NSSelectorFromString("scrollView")) as? UIScrollView {
- scrollView.delegate = self
- }
- }
+ __weak TestNavigationDelegate *weakSelf = self;
+ self.didFinishNavigation = ^(WKWebView *_view, WKNavigation *_nav) {
+ [expectation fulfill];
+ weakSelf.didFinishNavigation = nil;
+ };
}
+@end
diff --git a/tests/CordovaLibTests/CDVWebViewEngineTest.m
b/tests/CordovaLibTests/CDVWebViewEngineTest.m
index 74d17249..a47b6410 100644
--- a/tests/CordovaLibTests/CDVWebViewEngineTest.m
+++ b/tests/CordovaLibTests/CDVWebViewEngineTest.m
@@ -23,8 +23,8 @@
#import <Cordova/CDVWebViewProcessPoolFactory.h>
#import <Cordova/CDVSettingsDictionary.h>
#import <Cordova/CDVAvailability.h>
-
#import "CordovaApp-Swift.h"
+#import "CDVTestHelpers.h"
@interface CDVWebViewEngineTest : XCTestCase
@@ -41,40 +41,14 @@
@end
-@interface TestNavigationDelegate : NSObject <WKNavigationDelegate>
-@property (nonatomic, copy) void (^didFinishNavigation)(WKWebView *,
WKNavigation *);
-
-- (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
- (void)setUp {
[super setUp];
- // Put setup code here. This method is called before the invocation of
each test method in the class.
self.appDelegate = (AppDelegate*)[[UIApplication sharedApplication]
delegate];
[self.appDelegate createViewController];
@@ -86,7 +60,6 @@
}
- (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];
}
diff --git a/tests/CordovaLibTests/CordovaApp/ViewController.swift
b/tests/CordovaLibTests/CordovaApp/ViewController.swift
index 2000194d..5f67afe2 100644
--- a/tests/CordovaLibTests/CordovaApp/ViewController.swift
+++ b/tests/CordovaLibTests/CordovaApp/ViewController.swift
@@ -17,21 +17,24 @@
under the License.
*/
+import WebKit
import Cordova
-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]
+class DeviceReadyScriptHandler : NSObject, WKScriptMessageHandler {
+ func userContentController(_ userContentController:
WKUserContentController, didReceive message: WKScriptMessage) {
+ NotificationCenter.default.post(name:
NSNotification.Name("CDVTestingDeviceReadyFired"), object: nil)
+ }
+}
+class ViewController: CDVViewController {
+ override func viewDidLoad() {
super.viewDidLoad()
- self.view.addSubview(webView)
- self.view.sendSubviewToBack(webView)
+ if let wkWebView = self.webView as? WKWebView {
+ let controller = wkWebView.configuration.userContentController
+ let deviceReadyScriptHandler = DeviceReadyScriptHandler()
- if let scrollView =
self.webView?.perform(NSSelectorFromString("scrollView")) as? UIScrollView {
- scrollView.delegate = self
+ controller.add(deviceReadyScriptHandler, name: "cordovaTesting")
}
}
}
diff --git a/tests/CordovaLibTests/CordovaApp/config.xml
b/tests/CordovaLibTests/CordovaApp/config.xml
index 0a815b69..a4b77733 100644
--- a/tests/CordovaLibTests/CordovaApp/config.xml
+++ b/tests/CordovaLibTests/CordovaApp/config.xml
@@ -46,10 +46,15 @@
<preference name="Suppresses3DTouchGesture" value="false" />
<!-- This settings is just used by the CDVViewControllerTest to assert
which config file has been loaded -->
<preference name="test_CDVConfigFile" value="config.xml" />
-
+ <preference name="InspectableWebview" value="true" />
+
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage"/>
</feature>
+ <feature name="Console">
+ <param name="ios-package" value="CDVLogger"/>
+ <param name="onload" value="true"/>
+ </feature>
<feature name="HandleOpenUrl">
<param name="ios-package" value="CDVHandleOpenURL"/>
<param name="onload" value="true"/>
@@ -62,6 +67,10 @@
<param name="ios-package" value="CDVGestureHandler"/>
<param name="onload" value="true"/>
</feature>
+ <feature name="StatusBarInternal">
+ <param name="ios-package" value="CDVStatusBarInternal"/>
+ <param name="onload" value="true"/>
+ </feature>
<feature name="SwiftInit">
<param name="ios-package" value="SwiftInitPlugin"/>
</feature>
diff --git a/tests/CordovaLibTests/CordovaApp/www/index.html
b/tests/CordovaLibTests/CordovaApp/www/index.html
index 9da1c714..44074e7a 100644
--- a/tests/CordovaLibTests/CordovaApp/www/index.html
+++ b/tests/CordovaLibTests/CordovaApp/www/index.html
@@ -66,10 +66,15 @@
for more details -jm */
function onDeviceReady()
{
- // Used by unit tests to tell when the page is loaded.
- window.pageIsLoaded = true;
+ // Used by unit tests to tell when the page is loaded.
+ window.pageIsLoaded = true;
+
// do your thing!
console.log("Cordova is working")
+
+ if (window.webkit && window.webkit.messageHandlers &&
window.webkit.messageHandlers.cordovaTesting) {
+ window.webkit.messageHandlers.cordovaTesting.postMessage(null);
+ }
}
</script>
diff --git a/tests/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
b/tests/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
index 6a096353..b237508d 100644
--- a/tests/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
+++ b/tests/CordovaLibTests/CordovaTests.xcodeproj/project.pbxproj
@@ -27,6 +27,8 @@
/* Begin PBXBuildFile section */
900A9F542CF0677F00FECE7A /* ViewController.swift in Sources */
= {isa = PBXBuildFile; fileRef = 900A9F532CF0677F00FECE7A /*
ViewController.swift */; };
900A9F5A2CF0696300FECE7A /* SwiftInitPlugin.swift in Sources */
= {isa = PBXBuildFile; fileRef = 900A9F582CF0695D00FECE7A /*
SwiftInitPlugin.swift */; };
+ 9017CA502FD8206D00F540FC /* www in Resources */ = {isa =
PBXBuildFile; fileRef = 9017CA4F2FD8206D00F540FC /* www */; };
+ 9017CA532FD820B800F540FC /* cordova.js in CopyFiles */ = {isa =
PBXBuildFile; fileRef = 9017CA522FD820B800F540FC /* cordova.js */; };
902530FC29A6DC53004AF1CF /* CDVPluginInitTests.m in Sources */
= {isa = PBXBuildFile; fileRef = 902530FA29A6DC53004AF1CF /*
CDVPluginInitTests.m */; };
9021AA402FD8E41C00A950DD /* CDVWebViewEngineTests.swift in
Sources */ = {isa = PBXBuildFile; fileRef = 9021AA3F2FD8E41500A950DD /*
CDVWebViewEngineTests.swift */; };
905C8BA82CF0756E007EECEF /* AppDelegate.swift in Sources */ =
{isa = PBXBuildFile; fileRef = 905C8BA72CF0756E007EECEF /* AppDelegate.swift
*/; };
@@ -34,11 +36,12 @@
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
*/; };
+ 90B2907E2FD805A2000A7F60 /* CDVStatusBarTests.m in Sources */ =
{isa = PBXBuildFile; fileRef = 90B2907D2FD8059D000A7F60 /* CDVStatusBarTests.m
*/; };
+ 90B290812FD808DE000A7F60 /* CDVTestHelpers.m in Sources */ =
{isa = PBXBuildFile; fileRef = 90B290802FD808DD000A7F60 /* CDVTestHelpers.m */;
};
90D08FEB2F4E63CA00A9838F /* CDVURLSchemeHandlerTest.m in
Sources */ = {isa = PBXBuildFile; fileRef = 90D08FEA2F4E63CA00A9838F /*
CDVURLSchemeHandlerTest.m */; };
90D08FED2F4E690700A9838F /*
CDVSettingsDictionarySwiftTests.swift in Sources */ = {isa = PBXBuildFile;
fileRef = 90D08FEC2F4E690700A9838F /* CDVSettingsDictionarySwiftTests.swift */;
};
C0FA7CA11E4BB6420077B045 /* config.xml in Resources */ = {isa =
PBXBuildFile; fileRef = F8EB14D0165FFD3200616F39 /* config.xml */; };
C0FA7CA21E4BB6420077B045 /* [email protected] in Resources */
= {isa = PBXBuildFile; fileRef = 7EF33BD61911ABA20048544E /*
[email protected] */; };
- C0FA7CA41E4BB6420077B045 /* www in Resources */ = {isa =
PBXBuildFile; fileRef = 30F8AE1C152129DA006625B3 /* www */; };
C0FA7CA51E4BB6420077B045 /* config-custom.xml in Resources */ =
{isa = PBXBuildFile; fileRef = 5C4C91771C2ACF130055AFC3 /* config-custom.xml
*/; };
C0FA7CB51E4BBBBE0077B045 /* CDVAllowListTests.m in Sources */ =
{isa = PBXBuildFile; fileRef = 30356213141049E1006C2D43 /* CDVAllowListTests.m
*/; };
C0FA7CB61E4BBBBE0077B045 /*
CDVPluginResultJSONSerializationTests.m in Sources */ = {isa = PBXBuildFile;
fileRef = 686357B9141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m
*/; };
@@ -63,6 +66,16 @@
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
+ 9017CA512FD8208E00F540FC /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "$(SRCROOT)/CordovaApp/www";
+ dstSubfolderSpec = 0;
+ files = (
+ 9017CA532FD820B800F540FC /* cordova.js in
CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
C0FA7CDE1E4BC5020077B045 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
@@ -80,7 +93,6 @@
30356213141049E1006C2D43 /* CDVAllowListTests.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= CDVAllowListTests.m; sourceTree = "<group>"; };
30610C9119AD9B95000B3781 /* CDVCommandDelegateTests.m */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc;
path = CDVCommandDelegateTests.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>"; };
@@ -90,12 +102,17 @@
7EF33BD61911ABA20048544E /* [email protected] */ = {isa =
PBXFileReference; lastKnownFileType = image.png; path = "[email protected]";
sourceTree = "<group>"; };
900A9F532CF0677F00FECE7A /* ViewController.swift */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.swift; path =
ViewController.swift; sourceTree = "<group>"; };
900A9F582CF0695D00FECE7A /* SwiftInitPlugin.swift */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.swift; path =
SwiftInitPlugin.swift; sourceTree = "<group>"; };
+ 9017CA4F2FD8206D00F540FC /* www */ = {isa = PBXFileReference;
lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
+ 9017CA522FD820B800F540FC /* cordova.js */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.javascript; name = cordova.js;
path = ../../templates/project/www/cordova.js; sourceTree = "<group>"; };
902530FA29A6DC53004AF1CF /* CDVPluginInitTests.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= CDVPluginInitTests.m; sourceTree = "<group>"; };
9021AA3F2FD8E41500A950DD /* CDVWebViewEngineTests.swift */ =
{isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path =
CDVWebViewEngineTests.swift; sourceTree = "<group>"; };
905C8BA72CF0756E007EECEF /* AppDelegate.swift */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.swift; path =
AppDelegate.swift; sourceTree = "<group>"; };
9085EE2F2CF05B5900603B73 /* CordovaTests.xctestplan */ = {isa =
PBXFileReference; lastKnownFileType = text; path = CordovaTests.xctestplan;
sourceTree = "<group>"; };
90A775DC2C6F256D00FC5BB0 /* CDVSettingsDictionaryTests.m */ =
{isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path =
CDVSettingsDictionaryTests.m; sourceTree = "<group>"; };
90AE8F9D2EBF0E0300FF0979 /* SceneDelegate.swift */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.swift; path =
SceneDelegate.swift; sourceTree = "<group>"; };
+ 90B2907D2FD8059D000A7F60 /* CDVStatusBarTests.m */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path =
CDVStatusBarTests.m; sourceTree = "<group>"; };
+ 90B2907F2FD808CD000A7F60 /* CDVTestHelpers.h */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDVTestHelpers.h;
sourceTree = "<group>"; };
+ 90B290802FD808DD000A7F60 /* CDVTestHelpers.m */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path =
CDVTestHelpers.m; sourceTree = "<group>"; };
90D08FEA2F4E63CA00A9838F /* CDVURLSchemeHandlerTest.m */ = {isa
= PBXFileReference; lastKnownFileType = sourcecode.c.objc; path =
CDVURLSchemeHandlerTest.m; sourceTree = "<group>"; };
90D08FEC2F4E690700A9838F /*
CDVSettingsDictionarySwiftTests.swift */ = {isa = PBXFileReference;
lastKnownFileType = sourcecode.swift; path =
CDVSettingsDictionarySwiftTests.swift; sourceTree = "<group>"; };
C0FA7CAA1E4BB6420077B045 /* CordovaApp.app */ = {isa =
PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0;
path = CordovaApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -139,6 +156,7 @@
0867D691FE84028FC02AAC07 /* CordovaLib */ = {
isa = PBXGroup;
children = (
+ 9017CA522FD820B800F540FC /* cordova.js */,
9085EE2F2CF05B5900603B73 /*
CordovaTests.xctestplan */,
7EF33BD61911ABA20048544E /* [email protected]
*/,
F8EB14D0165FFD3200616F39 /* config.xml */,
@@ -166,7 +184,7 @@
905C8BA72CF0756E007EECEF /* AppDelegate.swift
*/,
900A9F532CF0677F00FECE7A /*
ViewController.swift */,
900A9F592CF0695D00FECE7A /* Plugins */,
- 30F8AE1C152129DA006625B3 /* www */,
+ 9017CA4F2FD8206D00F540FC /* www */,
);
path = CordovaApp;
sourceTree = "<group>";
@@ -191,6 +209,9 @@
EB3B34F4161B585D003DBE7D /* CordovaTests */ = {
isa = PBXGroup;
children = (
+ 90B290802FD808DD000A7F60 /* CDVTestHelpers.m */,
+ 90B2907F2FD808CD000A7F60 /* CDVTestHelpers.h */,
+ 90B2907D2FD8059D000A7F60 /* CDVStatusBarTests.m
*/,
90D08FEC2F4E690700A9838F /*
CDVSettingsDictionarySwiftTests.swift */,
9021AA3F2FD8E41500A950DD /*
CDVWebViewEngineTests.swift */,
90D08FEA2F4E63CA00A9838F /*
CDVURLSchemeHandlerTest.m */,
@@ -217,10 +238,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C0FA7CA71E4BB6420077B045 /*
Build configuration list for PBXNativeTarget "CordovaApp" */;
buildPhases = (
+ 9017CA512FD8208E00F540FC /* CopyFiles */,
C0FA7C9A1E4BB6420077B045 /* Sources */,
C0FA7C9E1E4BB6420077B045 /* Frameworks */,
C0FA7CA01E4BB6420077B045 /* Resources */,
- C0FA7CA61E4BB6420077B045 /* Copy cordova.js
into www directory */,
C0FA7CDE1E4BC5020077B045 /* Embed Frameworks */,
);
buildRules = (
@@ -291,9 +312,9 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 9017CA502FD8206D00F540FC /* www in Resources */,
C0FA7CA11E4BB6420077B045 /* config.xml in
Resources */,
C0FA7CA21E4BB6420077B045 /* [email protected]
in Resources */,
- C0FA7CA41E4BB6420077B045 /* www in Resources */,
C0FA7CA51E4BB6420077B045 /* config-custom.xml
in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -308,27 +329,6 @@
};
/* End PBXResourcesBuildPhase section */
-/* Begin PBXShellScriptBuildPhase section */
- C0FA7CA61E4BB6420077B045 /* Copy cordova.js into www directory
*/ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- "",
-
"$(SRCROOT)/../../templates/project/www/cordova.js",
- );
- name = "Copy cordova.js into www directory";
- outputPaths = (
-
$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/www/cordova.js,
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "cp
../../templates/project/www/cordova.js
\"$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/www/cordova.js\"\n";
- showEnvVarsInLog = 0;
- };
-/* End PBXShellScriptBuildPhase section */
-
/* Begin PBXSourcesBuildPhase section */
C0FA7C9A1E4BB6420077B045 /* Sources */ = {
isa = PBXSourcesBuildPhase;
@@ -353,6 +353,8 @@
C0FA7CB91E4BBBBE0077B045 /* CDVBase64Tests.m in
Sources */,
90A775DD2C6F257500FC5BB0 /*
CDVSettingsDictionaryTests.m in Sources */,
C0FA7CBA1E4BBBBE0077B045 /*
CDVFakeFileManager.m in Sources */,
+ 90B2907E2FD805A2000A7F60 /* CDVStatusBarTests.m
in Sources */,
+ 90B290812FD808DE000A7F60 /* CDVTestHelpers.m in
Sources */,
C0FA7CBB1E4BBBBE0077B045 /*
CDVViewControllerTest.m in Sources */,
90D08FEB2F4E63CA00A9838F /*
CDVURLSchemeHandlerTest.m in Sources */,
C0FA7CBC1E4BBBBE0077B045 /*
CDVInvokedUrlCommandTests.m in Sources */,
@@ -585,6 +587,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_THUMB_SUPPORT = NO;
@@ -623,6 +626,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
GCC_THUMB_SUPPORT = NO;
GCC_VERSION =
com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = (
diff --git a/tests/CordovaLibTests/CordovaTests.xctestplan
b/tests/CordovaLibTests/CordovaTests.xctestplan
index 6c5bf693..c2c91ff2 100644
--- a/tests/CordovaLibTests/CordovaTests.xctestplan
+++ b/tests/CordovaLibTests/CordovaTests.xctestplan
@@ -29,6 +29,7 @@
},
"testTargets" : [
{
+ "parallelizable" : true,
"target" : {
"containerPath" : "container:CordovaLibTests\/CordovaTests.xcodeproj",
"identifier" : "C0FA7CB11E4BBBBE0077B045",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]