Skip to content

Commit

Permalink
refactor: align ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES with the Xcode …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
yungu0010 authored Nov 20, 2024
1 parent 85265f3 commit 5e09f61
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
15 changes: 0 additions & 15 deletions Sources/XcodeProj/Utils/BuildSettingsProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit 5e09f61

Please sign in to comment.