Hi, my project configures the InfoPlist file path (INFOPLIST_PATH
) using a xcconfig
file variable. Specifically using variable assignments for different builds configurations:
INFOPLIST_FILE = Config/InfoDefault.plist
INFOPLIST_FILE[config=SomeConfig1] = Config/InfoConfig1.plist
INFOPLIST_FILE[config=SomeConfig2] = Config/InfoConfig2.plist
Tuist target definition API forces just one value and sets it as a build setting override for INFOPLIST_PATH
not allowing for the project or target level xcconfig
values to be picked up.
// Some required properties are omitted for brevity
Target.target(
name: "MyTarget",
bundleId: "$(PRODUCT_BUNDLE_IDENTIFIER_VAR)",
infoPlist: "Path to plist file", // Can't provide a xcconfig variable name
entitlements: .variable("$(CODE_SIGN_ENTITLEMENTS_FILE_PATH)"),
...
)
At the same time for entitlements Tuist offers a way to provide a xcconfig
variable using the .variable()
case allowing for setting different paths to entitlements files per build configuration:
/**
A user defined xcconfig variable map to .entitlements file.
This should be used when the project has different entitlements files per config (aka: debug,release,staging,etc)
.target(
...
entitlements: .variable("$(ENTITLEMENT_FILE_VARIABLE)"),
)
Or as literal string
.target(
...
entitlements: $(ENTITLEMENT_FILE_VARIABLE),
)
*/
case variable(String)
Is there a reason why InfoPlist
enum can't be extended with a .variable()
case similar to Entitlements
enum to provide a consistent way of setting variable values per build config?
As mentioned in the description I would add a .variable()
case to the InfoPlist
enum to align it with the Entitlements
enum and provide a consistent way of setting variable values per build config.
14.6.1
4.26.0
15.4
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too