I see how Xcode 4 splits the info on your targets nicely in one view, but how does one build and run these different builds? All I see are the options to build and to run, and these options to build for running, testing, and profiling. It's not clear to me how these map to the build configurations, though.
3 Answers
Xcode 4 introduces schemes which provide all the options on how to build/run/profile/etc. your application. You can change the active scheme using the Scheme
drop-down button at the top of the project window and/or edit the scheme via Product > Edit Scheme… ⌘<
menu item. Then on the left source list, you can select the Run
item, and in the Info
tab in the right pane you can choose to use the Release
configuration in the Build Configuration
drop-down.

- 2,608
- 2
- 19
- 7
-
2So is the only way to quickly run a release or debug to actually go into that Edit Scheme menu and change the build configuration setting each time I want to flip back and forth? – Joey Mar 22 '11 at 17:31
-
3I believe so. You can duplicate the scheme to separate Release and Debug if you want quicker access to them. – Adam Bryzak Mar 22 '11 at 20:49
-
6You can also just do a Product > Build For > Build For Archiving and that builds the Release configuration. – codykrieger Mar 27 '11 at 20:34
-
2Sure, but then how do you run what you just built? – BeeOnRope Mar 28 '11 at 12:37
-
67Wow, this is crazy, so if I want to test my app in release mode, I have to make a copy of the entire scheme??? That's nuts! – Simon Woodside Apr 13 '11 at 04:37
-
I am trying to run InApp in release mode, but with those steps it still asks me to login with a SandBox account – Nathan H Sep 11 '11 at 06:38
-
1I agree! I can't believe Xcode doesn't provide that option (running in release mode)! – Yuchen Wang Nov 05 '11 at 04:59
-
It's not exactly as nice as having a menu item for that, but you can keep your release build folder opened in Finder and open the app built using "Product > Build For > Build For Archiving" manually from there. In that case there is no need to create a duplicate scheme to run a release build. – Form Nov 22 '11 at 00:12
In Xcode 4.3 -- go to Product/Build For and select Archiving. This compiles a release build and places it in an obscure folder which you'll never find on your own. The quickest way to get there is to select your app in Xcode's project navigator (in the Products folder), right-click, select Show in Finder. It will take you to the debug build but the release build is in a folder right next to it.

- 141
- 1
- 2
-
It appear that in Xcode 6.1 there is no Product > Build For > Archiving. – thomthom Mar 04 '15 at 22:52
-
1
To add to Adam Bryzak answer, you need to activate the DEBUG and release (and adhoc if needed) in the build settings settings.
Under project/Build settings, search for Preprocessor Macros and set the Debug and release values to 1 in order to activate them:
This way, in the edit schemes, when you switch between DEBUG and release, Xcode will know that he should to change the build mode.

- 15,434
- 34
- 105
- 192