From 5e09f610f17cb6eb8b3c1c94073db1ac919bd9a7 Mon Sep 17 00:00:00 2001 From: Yunseo Kang <65678579+yungu0010@users.noreply.github.com> Date: Wed, 20 Nov 2024 21:49:38 +0900 Subject: [PATCH] refactor: align ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES with the Xcode default (#881) * fix: aline always_embed_swift_standard_libiraries with the xcode default * delete always_embed_swift_standard_libraries from test targetSettings watchOSApplication * remove no longer used method * fix build error --- .../XcodeProj/Utils/BuildSettingsProvider.swift | 15 --------------- .../Utils/BuildSettingsProviderTests.swift | 1 - 2 files changed, 16 deletions(-) diff --git a/Sources/XcodeProj/Utils/BuildSettingsProvider.swift b/Sources/XcodeProj/Utils/BuildSettingsProvider.swift index 82a845c36..cc529a787 100644 --- a/Sources/XcodeProj/Utils/BuildSettingsProvider.swift +++ b/Sources/XcodeProj/Utils/BuildSettingsProvider.swift @@ -72,10 +72,6 @@ public class BuildSettingsProvider { buildSettings.merge(targetSwiftSettings(product: product), uniquingKeysWith: { $1 }) } - if let platform, let product, let swift, swift == true { - buildSettings.merge(targetSwiftSettings(platform: platform, product: product), uniquingKeysWith: { $1 }) - } - return buildSettings } @@ -370,17 +366,6 @@ public class BuildSettingsProvider { return [:] } } - - private static func targetSwiftSettings(platform: Platform, product: Product) -> BuildSettings { - switch (platform, product) { - case (.watchOS, .application): - return [ - "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES": "YES", - ] - default: - return [:] - } - } } // Overloading `~=` enables customizing switch statement pattern matching diff --git a/Tests/XcodeProjTests/Utils/BuildSettingsProviderTests.swift b/Tests/XcodeProjTests/Utils/BuildSettingsProviderTests.swift index 4b65f3e19..c03339fce 100644 --- a/Tests/XcodeProjTests/Utils/BuildSettingsProviderTests.swift +++ b/Tests/XcodeProjTests/Utils/BuildSettingsProviderTests.swift @@ -135,7 +135,6 @@ class BuildSettingProviderTests: XCTestCase { // Then assertEqualSettings(results, [ - "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES": "YES", "ASSETCATALOG_COMPILER_APPICON_NAME": "AppIcon", "ENABLE_PREVIEWS": "YES", "LD_RUNPATH_SEARCH_PATHS": ["$(inherited)", "@executable_path/Frameworks"],