Ludovic Landry
Ludovic Landry

Reputation: 11784

Where is set the active build configuration in Xcode 4

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.

Upvotes: 31

Views: 26334

Answers (3)

BTRUE
BTRUE

Reputation: 390

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

Upvotes: 3

Ben Mosher
Ben Mosher

Reputation: 13381

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.

Upvotes: 33

rckoenes
rckoenes

Reputation: 69499

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.

Upvotes: 17

Related Questions