-
Hi!
So I tried to pass settings in my manifest file like below and finally I got my settings for debug configuration was fine. What is the right way to pass settings? Why settings may or may not be applied depending on configuration type? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @shurale85
In terms of how to set the setting in Tuist, you have a few options
let settings: Settings = .settings(
configurations: [
.debug(name: "Debug", xcconfig: "Configs/Debug.xcconfig"),
.release(name: "Release", xcconfig: "Configs/Release.xcconfig"),
],
defaultSettings: .recommended(excluding: ["SWIFT_ACTIVE_COMPILATION_CONDITIONS"])
)
let project = Project(
// ...
settings: settings,
targets: [
// ...
]
) hope this helps |
Beta Was this translation helpful? Give feedback.
Hi @shurale85
SWIFT_ACTIVE_COMPILATION_CONDITIONS
is one of the build settings Tuist has a default for in debug at the target level. This ends up taking precedence over any defined in the xcconfig sadly and that is why only the release configuration is working in your first attempt.In terms of how to set the setting in Tuist, you have a few options
(1) The first is the one you already discovered, which is explicitly specifying them in
Settings
within theProject.swift
manifest at the target level which takes precedence over the tuist defaults (but does mean the setting in the xcconfig would be redundant)(2) Another would be to exclude
SWIFT_ACTIVE_COMPILATION_CONDITIONS
from the lis…