-
-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add buildArchitectures
to XCScheme+BuildAction
#824
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work @woin2ee - thanks for contributing this
case "All": | ||
self = .universal | ||
default: | ||
self = .matchRunDestination |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From testing in a Xcode, unspecified or random values default to useTargetSettings
self = .matchRunDestination | |
self = .useTargetSettings |
Alternatively can make this an failable init (init?
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right. It’s my mistake. 🙏
@@ -84,11 +116,13 @@ extension XCScheme { | |||
postActions: [ExecutionAction] = [], | |||
parallelizeBuild: Bool = false, | |||
buildImplicitDependencies: Bool = false, | |||
runPostActionsOnFailure: Bool? = nil) { | |||
runPostActionsOnFailure: Bool? = nil, | |||
buildArchitectures: Architectures = .matchRunDestination) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an interesting one
- New schemes created in the Xcode UI do indeed default to
.matchRunDestination
- The current released version of
XcodeProj
doesn't explicitly write this attribute when creating new schemes (i.e. would be.useTargetSettings
)
Having matchRunDestination
as the new default for the init
here would introduce a change in behaviour for existing clients of the library and all their generated schemes would go from .useTargetSettings
> .matchRunDestination
🙈
buildArchitectures: Architectures = .matchRunDestination) { | |
buildArchitectures: Architectures = .useTargetSettings) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current released version didn't have control over this attribute, so I thought it wouldn't affect existing clients as if it were a new feature.
However, I missed the fact that there may be clients who are using the current version's settings well. Thank you for your review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @woin2ee
@all-contributors add @woin2ee for code |
I've put up a pull request to add @woin2ee! 🎉 |
This PR is related to tuist/tuist#6003
Short description 📝
It makes enable to set
Override Architectures
option of build action.Solution 📦
I observed the changes in the
xcscheme
file as I changed theOverride Architectures
option. After that, I decided to add the attribute in a similar way to the existing implementation ofbuildImplicitDependencies
andrunPostActionsOnFailure
.Implementation 👩💻👨💻
Override Architectures
option.buildArchitectures
property inXCScheme.BuildAction
.