Adding a build configuration in Xcode

2019-01-06 11:59发布

问题:

I'd like to add a new build configuration in Xcode 5, "QA", to the other three we currently have (Debug, Distribution, Release). However, when I click "Editor > Add Configuration", everything is grayed out. I'm not very familiar with Xcode in the first place, so I'm not sure how to go about doing this.

Is there a reason it's grayed out? Is this this process to add a build configuration? Thanks.

回答1:

I ran into this same problem and figured it out. Here is a screenshot of the problem. I want to duplicate my "Release" configuration, but the option to do so is disabled. Why?

The answer is hiding behind this little button here (circled in red)...

This menu will open to reveal that you currently have a build target selected. Build targets don't have their own configurations.

Configurations are project-wide. If you select the project file, the menu will work, as shown here.

You also have to make sure that the 'Info' tab is selected, the options are still greyed out if you are on the 'Build Settings' page