Scheme Setting Not Persisting For Associated Target

I have an Xcode 15.4 project with 4 targets (i.e. 2 UI and 2 CLI). Next, I'm looking to set a unique scheme for each target but it keeps changing to one of the previously set schemes. For example, I have the following four targets and I would like to have the associated:

Target 1 - > Scheme 1
Target 2 -> Scheme 2
Target 3 -> Scheme 3
Target 4 -> Scheme 4

When the target is selected, shouldn't the corresponding scheme be updated in the Xcode toolbar? Or is there a setting that I'm missing to enable/disable within Xcode that would resolve this issue?

Finally, I'm seeing similar behavior in Xcode 16 beta 1.

Hi

I think it works the other way around. at least for me in Xcode 15 and also now in Xcode 16:

A schema definition is neutral at the beginning and only in the schema definition can you determine or assign the target. Xcode does this for you using Autocreate. But you can also edit it yourself. A schema can contain one (1) target or several. Facit: so, selecting the Target in Project-Navigator does not change Schema. at least for me since "ever". Hope it helps. Take care.

Single Schema related to Target: Screenshots (Xcode 16 Beta)

Single Schema related to multiple Targets (Build all):

Scheme Setting Not Persisting For Associated Target
 
 
Q