From 67d27d9b6943651aa1215de382ed992dbe40bc65 Mon Sep 17 00:00:00 2001 From: Tomas Camin Date: Fri, 23 Feb 2024 08:58:35 +0100 Subject: [PATCH] Rework XcodeGen specification --- Example/SPM/project.yml | 6 ++-- Example/project.yml | 73 +++++++++++++++++++++++++++++++++-------- Scripts/build_lib.rb | 4 +-- 3 files changed, 65 insertions(+), 18 deletions(-) diff --git a/Example/SPM/project.yml b/Example/SPM/project.yml index 896e078f..cc0eac48 100644 --- a/Example/SPM/project.yml +++ b/Example/SPM/project.yml @@ -21,7 +21,7 @@ targets: settings: base: INFOPLIST_FILE: "../SBTUITestTunnel/SBTUITestTunnel-Info.plist" - CODE_SIGN_ENTITLEMENTS: "../SBTUITestTunnel_Example.entitlements" + CODE_SIGN_ENTITLEMENTS: "../SBTUITestTunnel_Example.entitlements" UITests: type: bundle.ui-testing platform: iOS @@ -33,7 +33,7 @@ targets: INFOPLIST_FILE: "../SBTUITestTunnel_Tests/Info.plist" schemes: - SBTUITestTunnel_Example: + SBTUITestTunnel: build: targets: App: [all] @@ -51,7 +51,9 @@ schemes: UITests: [all] run: executable: App + debugEnabled: false buildConfiguration: Debug test: targets: - UITests + debugEnabled: false diff --git a/Example/project.yml b/Example/project.yml index 29198e66..f6b89806 100644 --- a/Example/project.yml +++ b/Example/project.yml @@ -9,7 +9,6 @@ fileGroups: - SBTUITestTunnel_Example.entitlements targets: - SBTUITestTunnel_Example: type: application platform: iOS @@ -25,12 +24,6 @@ targets: - sdk: UIKit.framework - sdk: Foundation.framework - sdk: CoreGraphics.framework - scheme: - gatherCoverageData: true - testTargets: - - SBTUITestTunnel_Tests - coverageTargets: - - SBTUITestTunnel_Example SBTUITestTunnel_Tests: type: bundle.ui-testing @@ -43,9 +36,6 @@ targets: - SBTUITestTunnel_Tests dependencies: - target: SBTUITestTunnel_Example - scheme: - testTargets: - - SBTUITestTunnel_Tests SBTUITestTunnel_TestsNoSwizzling: type: bundle.ui-testing @@ -53,12 +43,67 @@ targets: deploymentTarget: "12.2" settings: base: - GCC_PREPROCESSOR_DEFINITIONS: ["DISABLE_UITUNNEL_SWIZZLING=1", "$(inherited)"] + GCC_PREPROCESSOR_DEFINITIONS: + ["DISABLE_UITUNNEL_SWIZZLING=1", "$(inherited)"] INFOPLIST_FILE: "SBTUITestTunnel_TestsNoSwizzling/Info.plist" sources: - SBTUITestTunnel_TestsNoSwizzling dependencies: - target: SBTUITestTunnel_Example - scheme: - testTargets: - - SBTUITestTunnel_TestsNoSwizzling \ No newline at end of file + +schemes: + SBTUITestTunnel: + build: + targets: + SBTUITestTunnel_Example: [run, test, profile, analyze, archive] + config: Debug + profile: + config: Debug + test: + targets: + - SBTUITestTunnel_Tests + config: Debug + gatherCoverageData: true + disableMainThreadChecker: true + language: en + region: EN + + SBTUITestTunnel_Tests: + run: + debugEnabled: false + build: + targets: + SBTUITestTunnel_Example: [run, test, profile, analyze, archive] + config: Debug + profile: + config: Debug + test: + targets: + - SBTUITestTunnel_Tests + config: Debug + gatherCoverageData: true + disableMainThreadChecker: true + language: en + region: EN + management: + isShown: false + + SBTUITestTunnel_NoSwizzlingTests: + run: + debugEnabled: false + build: + targets: + SBTUITestTunnel_Example: [run, test, profile, analyze, archive] + config: Debug + profile: + config: Debug + test: + targets: + - SBTUITestTunnel_TestsNoSwizzling + config: Debug + gatherCoverageData: true + disableMainThreadChecker: true + language: en + region: EN + management: + isShown: false diff --git a/Scripts/build_lib.rb b/Scripts/build_lib.rb index fc049bd5..8f4bd0e7 100755 --- a/Scripts/build_lib.rb +++ b/Scripts/build_lib.rb @@ -2,9 +2,9 @@ require "fileutils" module Build - EXAMPLE_APP_SCHEME = "SBTUITestTunnel_Example" + EXAMPLE_APP_SCHEME = "SBTUITestTunnel" UITESTS_SCHEME = "SBTUITestTunnel_Tests" - UITESTS_NOSWIZZ_SCHEME = "SBTUITestTunnel_TestsNoSwizzling" + UITESTS_NOSWIZZ_SCHEME = "SBTUITestTunnel_NoSwizzlingTests" def self.run_build(project_path) puts "⏳ Building app..."