You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Support multiple values for the same environment variable in custom schemes #3342
Xcode's scheme editor allows several rows with the same environment variable name, each with its own checkbox. This is a convenient way to keep a menu of known values, for example OS_ACTIVITY_MODE rows for disable, info, and debug, or CFNETWORK_DIAGNOSTICS rows for 1, 2, and 3, with one of them checked.
Custom schemes cannot express this, because env in xcschemes.run, xcschemes.profile, and xcschemes.test is a dict, so each key carries exactly one value. Rows added by hand in Xcode are lost on the next regeneration.
Proposal
Allow an env value to also be a list of xcschemes.env_value entries. Each entry becomes one row for that key, in list order:
This generates three OS_ACTIVITY_MODE rows with only disable enabled. Single values and "inherit" keep their current behavior.
Implementation
Only Starlark changes are needed: _env_infos_from_dict in xcscheme_infos.bzl would produce a list of values per key, and _add_env in xcschemes_execution.bzl would write the flattened count and one triple per entry. The generator already parses custom scheme variables into an array and writes them in order without deduplicating by key.
I am happy to open a pull request with the change, docs, tests, and a CHANGELOG entry.
Activity