How to add configurations to Xcode?

XcodeConfiguration

Xcode Problem Overview


There are no other way, I search a lot. In XCode 3 this is easy, but now..

In the screen above, I have the Build Configuration, so I can chose if I want:

  • Debug
  • Release

the screen

This 2 kind of config, have their own config in "Build Settings" tabs (in targets config). To create I third one, the Distribution, reading here, it show this image in XCode 3 boring xcode 3

Where I can do the same in XCode 4????

edit-> Only create a new Schema didn't work, like this is a config in "Build Settings" tag of Targets. I can chose a config for "Debug" and "Release", but, and for I third one?

enter image description here

Xcode Solutions


Solution 1 - Xcode

Have a look at the project settings. There is a + button that you can use to add to configurations here.

enter image description here

Solution 2 - Xcode

You don't need it.

Make sure you check the following list before you Archive:

  • In Edit Scheme: Select Release as Build Configuration for Archive,

  • In Project Build Setting: Set Entitlements.plist and your Distribution code signing for Release scheme,

  • In Entitlements.plist: Set No to ‘can be debugged’.

Then archive and share with your ad-hoc provisioning or submit with distribution provisioning.

Hope this is a comprehensive checklist.

EDIT:

to duplicate an existing configuration: enter image description here

Solution 3 - Xcode

I had a similar issue where I wanted some special behaviour for beta builds

These are the steps I took (mostly an expansion of the answer given by @ZhangChn)

  1. Duplicate the Release Configuration and rename it beta.
  2. Added a BETA pre-processor macro to the Beta Configuration under build settings.
  • Make other changes to your build configuration here.
  1. Go into manage schemes and duplicate the main scheme for my project and rename it to Beta.
  2. Edit the new scheme and change the target build configuration to beta (or whatever you named your new build configuration.
  3. ...
  4. Profit!!!!

Or not, at any rate you should now be able to switch your desired setting simply by changing the scheme you're using instead of mucking about with settings every time.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRodrigoView Question on Stackoverflow
Solution 1 - XcodeAbizernView Answer on Stackoverflow
Solution 2 - XcodeZhangChnView Answer on Stackoverflow
Solution 3 - XcodetapiView Answer on Stackoverflow