开发者

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 direc开发者_JAVA百科tive on the best practice, which implies that I may be unclear on something conceptually.)

Thanks.


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.)


I would be using the new Archive feature for releases. Archive defaults to using the Release configuration.


I'm in the same situation as you are and after playing a bit with the scheme editor I would say that yes, if it's something you do on a regular bases you should create a scheme for each scenario.

At first I was a bit annoyed with the transition to scheme, but really it is a lot better, allowing to control more precisely what happens in ever scheme.

Sure it's annoying at first, since it was easier to switch build settings before ad-hoc, but now you can more easily switch between multiple settings that relates to which targets to build, & which configuration to use for every case.

And of course you can still go to edit scheme and change the build settings used if you just want a one time change.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜