Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I choose a configuration in Xcode 4 without creating a scheme?

I upgraded an Xcode 3 project to Xcode 4. The default scheme builds my Debug configuration. If I want to build Release (a configuration which of course already exists) or Ad-Hoc, etc, is the right way to handle this to create a new Scheme for it? (It seems unexpected that I'd have to manually create a new scheme for every one of my 5 existing configurations except Debug.)

Or is there a more lightweight way? If I'm fundamentally misunderstanding something, feel free to set me straight.

(I have read the Xcode 4 transition guide, but I don't seem find a clear directive on the best practice, which implies that I may be unclear on something conceptually.)

Thanks.

like image 916
Ben Zotto Avatar asked Mar 15 '11 04:03

Ben Zotto


1 Answers

Each target has several schemes. Each scheme allows you to choose which build configuration you want to use.

If I want to quickly switch between an ad-hoc distribution build and a release distribution build, I'd use the Scheme drop down, click on Edit Scheme..., click on Archive, then use the Build configuration drop down to change the configuration. Then I click OK.

I can now use Product, Archive and my selected configuration will be built. No specific need to create a scheme for each and every configuration and target (which would be a huge burden in my project, too).

It's a few more steps than it used to be, but still easier than creating dozens of extra schemes.

(Admittedly, I'm still not fully aware of the advantages and disadvantages of frequently modifying the schemes vs creating dozens and having all the settings correctly configured. However, this is my current method of working through it.)

like image 72
lilbyrdie Avatar answered Sep 24 '22 13:09

lilbyrdie