How do I run a preferred target in Xcode?

If you have more than one app target, you have more than one scheme. If you have more than one scheme, you can pick a scheme from the scheme menu (at the top of the project window). Then when you run, that scheme will be what builds and runs (on the corresponding destination).

In this screen shot, I have two app targets and hence two schemes ("backgroundPlayer" and "interrupter"):

enter image description here

As you can see, "backgroundPlayer" is checked. So if I build and run now, I build and run "backgroundPlayer". But if I choose "interrupter", then it will be checked, so if I then build and run, I build and run "interrupter".

Tags:

Xcode

Targets