Skip to content

Commit

Permalink
Merge pull request #417 from dangthaison91/compilation-mode
Browse files Browse the repository at this point in the history
Add SWIFT_COMPILATION_MODE and CODE_SIGN_IDENTITY build settings
  • Loading branch information
Pedro Piñera Buendía authored May 16, 2019
2 parents 39979d5 + 0fd9b59 commit c17e1af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Can access embed frameworks build phase for a target by @llinardos.
- Added `com.apple.product-type.framework.static` to `PBXProductType`. https://github.com/tuist/xcodeproj/pull/347 by @ileitch.
- Can add a not existing file to a group https://github.com/tuist/xcodeproj/pull/418 by @llinardos.
- **Breaking** Add `SWIFT_COMPILATION_MODE` and `CODE_SIGN_IDENTITY` build settings, remove `DEBUG` flag for Release https://github.com/tuist/xcodeproj/pull/417 @dangthaison91

### Fixed

Expand Down
5 changes: 3 additions & 2 deletions Sources/xcodeproj/Utils/BuildSettingsProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public class BuildSettingsProvider {
var buildSettings: [String: Any] = [:]
if let platform = platform, platform == .iOS {
buildSettings["SDKROOT"] = "iphoneos"
buildSettings["CODE_SIGN_IDENTITY"] = "iPhone Developer"
buildSettings["LD_RUNPATH_SEARCH_PATHS"] = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
buildSettings["CODE_SIGN_IDENTITY"] = "iPhone Developer"
}
if let platform = platform, platform == .macOS {
buildSettings["SDKROOT"] = "macosx"
Expand All @@ -67,10 +67,11 @@ public class BuildSettingsProvider {
if let variant = variant, let swift = swift, variant == .debug, swift == true {
buildSettings["SWIFT_OPTIMIZATION_LEVEL"] = "-Onone"
buildSettings["SWIFT_ACTIVE_COMPILATION_CONDITIONS"] = "DEBUG"
buildSettings["SWIFT_COMPILATION_MODE"] = "singlefile"
}
if let variant = variant, let swift = swift, variant == .release, swift == true {
buildSettings["SWIFT_OPTIMIZATION_LEVEL"] = "-Owholemodule"
buildSettings["SWIFT_ACTIVE_COMPILATION_CONDITIONS"] = "DEBUG"
buildSettings["SWIFT_COMPILATION_MODE"] = "wholemodule"
}
if let product = product, product == .framework {
buildSettings["CODE_SIGN_IDENTITY"] = ""
Expand Down

0 comments on commit c17e1af

Please sign in to comment.