From c8cbc070d65c40ba0453143ec3f8b48851b18b3c Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 19 Aug 2024 15:57:19 -0700 Subject: [PATCH] iOS: Testplan tweaks and support next Cordova major --- tests/ios/App/AppDelegate.swift | 14 ++++++++++++++ .../DeviceTests.xctestplan | 4 +++- .../UnitTests.xctestplan | 4 +++- .../ios/OAuthPluginTests.xcodeproj/project.pbxproj | 4 ++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/tests/ios/App/AppDelegate.swift b/tests/ios/App/AppDelegate.swift index 079d56c..dbc2bda 100644 --- a/tests/ios/App/AppDelegate.swift +++ b/tests/ios/App/AppDelegate.swift @@ -19,4 +19,18 @@ import Cordova @UIApplicationMain class AppDelegate: CDVAppDelegate { + var _window : UIWindow?; + + override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { + let bounds = UIScreen.main.bounds; + + let window = UIWindow(frame: bounds); + window.autoresizesSubviews = true; + window.rootViewController = CDVViewController(); + window.makeKeyAndVisible(); + + self._window = window; + + return true; + } } diff --git a/tests/ios/OAuthPluginTests.xcodeproj/DeviceTests.xctestplan b/tests/ios/OAuthPluginTests.xcodeproj/DeviceTests.xctestplan index 19e1b2f..8affa16 100644 --- a/tests/ios/OAuthPluginTests.xcodeproj/DeviceTests.xctestplan +++ b/tests/ios/OAuthPluginTests.xcodeproj/DeviceTests.xctestplan @@ -10,11 +10,13 @@ ], "defaultOptions" : { "codeCoverage" : false, + "repeatInNewRunnerProcess" : true, "targetForVariableExpansion" : { "containerPath" : "container:OAuthPluginTests.xcodeproj", "identifier" : "905131B827F1631300AC00FC", "name" : "OAuthPluginTest" - } + }, + "testRepetitionMode" : "retryOnFailure" }, "testTargets" : [ { diff --git a/tests/ios/OAuthPluginTests.xcodeproj/UnitTests.xctestplan b/tests/ios/OAuthPluginTests.xcodeproj/UnitTests.xctestplan index 4c74c03..a5cf1de 100644 --- a/tests/ios/OAuthPluginTests.xcodeproj/UnitTests.xctestplan +++ b/tests/ios/OAuthPluginTests.xcodeproj/UnitTests.xctestplan @@ -10,11 +10,13 @@ ], "defaultOptions" : { "codeCoverage" : true, + "repeatInNewRunnerProcess" : true, "targetForVariableExpansion" : { "containerPath" : "container:OAuthPluginTests.xcodeproj", "identifier" : "905131B827F1631300AC00FC", "name" : "OAuthPluginTest" - } + }, + "testRepetitionMode" : "retryOnFailure" }, "testTargets" : [ { diff --git a/tests/ios/OAuthPluginTests.xcodeproj/project.pbxproj b/tests/ios/OAuthPluginTests.xcodeproj/project.pbxproj index 6e1151b..0f7cc97 100644 --- a/tests/ios/OAuthPluginTests.xcodeproj/project.pbxproj +++ b/tests/ios/OAuthPluginTests.xcodeproj/project.pbxproj @@ -309,6 +309,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -341,6 +342,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -370,6 +372,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -402,6 +405,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES;