31

I have 3 configurations in my project (Debug, Distribution_AdHoc and Distribution_AppStore). In Xcode 3 we had a list to choose device, version, configuration and target before build and run. Now with Xcode 4 we only have the device kind and version in this list. This bring my two questions:

  1. So where is defined the configuration used ? Is that the configuration defined in "Project > Info > Command-line builds use: Debug" ?

  2. And now the "Project" menu is replaced by "Product" So where can we create (or duplicate and edit) a Configuration ?

Thank you.

James Webster
  • 31,873
  • 11
  • 70
  • 114
Ludovic Landry
  • 11,606
  • 10
  • 48
  • 80
  • 2
    [iPhone - how to change the build configuration to distribution](http://stackoverflow.com/q/8804248/194544) – beryllium Mar 26 '12 at 19:59

3 Answers3

33

Just in case you still want to make a Distribution config (or other config--I still find them useful), after great length (read: searched in the help for 'duplicate'), I found this:

the editor menu holds the key!

At first, they were all grayed out; this was because I had one of the targets highlighted in the editor (MFE, MFETests, etc.). If you highlight your project (as in the screenshot), they become enabled.

Ben Mosher
  • 13,251
  • 7
  • 69
  • 80
  • 18
    You also have to get into the "Info" tab as shown in Ben's screenshot. I was in the "Build settings" tab and the "Duplicate…" menu items were grayed out. – Haentz Apr 01 '11 at 06:40
  • Thanks for the screen shot. It really helped to save my time. – Rahul Nov 03 '11 at 12:53
  • 1
    Even after selecting the project the menu was grayed out for me. I had to click on the project even thoug it was already selected (in the Project Navigator window), then on the smaller project icon (the one above the target) and only then the damned thing got enabled! – Julian Feb 14 '12 at 21:27
17

You can use alt(option) and click on either, run, test or profile to see the option. Here you can set the target for each option.

For Archive the release is normally used, since can you resign your app via the organizer there is no need ad-hoc and appstore target any more.

rckoenes
  • 69,092
  • 8
  • 134
  • 166
3

For part 1 of your question,

The configuration is set in the schema window. apple+shift+comma to get to the window. Or Product > Scheme > Manage Schemes from the menu bar.

In the window, click the type of build you want on the left panel: Build, Run, Profile, Analyze, or Archive. In the window tab usually, along the type, there is an option Build Configuration that can be set. Select Debug, Release, or whichever configuration you want there.

The exception if the build task. The build task uses whatever configuration is set for the Run task. Also, the analyze and archive tasks only have one tab, so using the info tab is not necessity.

Apparently, "build" is shorthand for "build for run"...

BTRUE
  • 390
  • 3
  • 8