Ian Warburton
Ian Warburton

Reputation: 15716

Build project without selecting it as the active scheme?

In Visual Studio you can right-click on a project and build it. With XCode it seems as though one must select a project using the active scheme selector in the tool bar before you can build a target. Is it possible to leave the active scheme as is and build a different target?

Upvotes: 0

Views: 216

Answers (1)

matt
matt

Reputation: 535889

There is not really any such thing as "the active scheme". There is only the scheme that will be used the next time you build (or perform any other scheme action: build, run, test, profile, archive). That's the one that's selected in the toolbar.

If that scheme says to build a certain target, that is the target you'll build if you use Xcode's GUI interface to build.

It is not obvious to me what objection you could have to changing schemes, since this is exactly how to change what target you will build. It doesn't affect the interface in any way, for example. All you're doing is specifying what to build, which seems to be exactly what you want to do.

However, naturally you can always call xcodebuild to build any target (or scheme, for that matter), quite without regard to the Xcode interface.

Upvotes: 1

Related Questions