Add TUIST_SWIFT_CONDITIONS for injecting compiler flags at project generation time#6661
Merged
Conversation
…neration time Introduces a generic mechanism to pass arbitrary Swift active compilation conditions when generating Xcode projects via Tuist. Any target generated through the Tuist Xcode project mode (TUIST_RC_XCODE_PROJECT=true) will pick up the flags automatically. Usage: TUIST_RC_XCODE_PROJECT=true TUIST_SWIFT_CONDITIONS="MY_FLAG" tuist generate PaywallsTester TUIST_RC_XCODE_PROJECT=true TUIST_SWIFT_CONDITIONS="FLAG_A FLAG_B" tuist generate Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
e3a4c6e to
97a81ed
Compare
5 tasks
rickvdl
approved these changes
Apr 21, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Author
|
Done, renamed to |
This was referenced Apr 22, 2026
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TUIST_SWIFT_CONDITIONSenvironment variable that injects arbitrary Swift active compilation conditions into Tuist-generated Xcode project targetsRevenueCat,RevenueCatUI, andPaywallsTestertargets when using Xcode project mode (TUIST_RC_XCODE_PROJECT=true)Local.xcconfigUsage
Test plan
TUIST_RC_XCODE_PROJECT=true TUIST_SWIFT_CONDITIONS="ENABLE_WORKFLOWS_ENDPOINT" tuist generate PaywallsTesterand verifyENABLE_WORKFLOWS_ENDPOINTappears in build settings for RevenueCat, RevenueCatUI, and PaywallsTester targetstuist generate PaywallsTesterwithout env vars and verify no flags are added🤖 Generated with Claude Code
Note
Low Risk
Build-generation-only change that appends optional compiler flags; low blast radius but could change local build behavior if the env var is set incorrectly.
Overview
Adds a new
TUIST_SWIFT_CONDITIONSenv var to inject additionalSWIFT_ACTIVE_COMPILATION_CONDITIONSat Tuist project-generation time.Introduces
SettingsDictionary.appendingTuistSwiftConditions()and applies it to theRevenueCat,RevenueCatUI, andPaywallsTestertargets so any provided flags are appended to inherited build settings without modifying repo configs.Reviewed by Cursor Bugbot for commit fd0990f. Bugbot is set up for automated code reviews on this repo. Configure here.