How do I toggle between Debug and Release builds in Xcode 6 / 7 / 8?

78,486

Solution 1

In Xcode 6 - 10:

Choose Product -> Scheme -> Edit Scheme. Change the Build Configuration under the Info tab.

Shortcut: hold Alt and click the run button .


enter image description here

enter image description here

Solution 2

When you want to generate a release build, choose Product -> Archive. That is a Release build. Now you can export as a Mac OS X app.

Solution 3

The easiest way with a project that has the default set up for schemes is just to do Product -> Build For -> Profiling.

Share:
78,486

Related videos on Youtube

drewish
Author by

drewish

These days I'm paid to work on Ruby and JavaScript, I play around with C++, but in my past I've spent plenty of time doing PHP.

Updated on July 08, 2022

Comments

  • drewish
    drewish almost 2 years

    How do I get Xcode to build an OS X app in release mode? I can only seem to find instructions for earlier versions and none of the screenshots match. I didn't see anything when I put "release" into the help menu's search.

  • drewish
    drewish over 9 years
    Man, never would have discovered that.
  • ljk321
    ljk321 over 9 years
    @drewish The product icon on the left top corner (on the right of "Run" and "Stop" button) also has a shortcut for "Edit Scheme".
  • drewish
    drewish over 9 years
    After looking at the scheme, the other short cut to get a release build is to profile the app.
  • mm2001
    mm2001 over 8 years
    Nice. Then is there an easy way to run it, without the profiler also starting up?
  • chrisdembia
    chrisdembia over 8 years
    I would like to know this too. I don't want the profiler to start up.
  • Emil Styrke
    Emil Styrke about 8 years
    This is exactly what I needed! If you want to run as well as build, use the other answer by skyline75489.
  • Eric Gopak
    Eric Gopak over 7 years
    Profiling should have nothing to do with preparing a release version of the app.
  • Wolfr
    Wolfr over 7 years
    I don't see where the actual .app files end up.
  • ljk321
    ljk321 over 7 years
    You should use "archive" to get the actual .app.
  • Pierz
    Pierz over 6 years
    It should be noted that 'Edit Scheme' allows one to edit the defaults for any of the predefined schemes (e.g. 'Run', 'Test', 'Profile', 'Archive', etc) so that they use the 'Release' or 'Debug' configurations.
  • Fattie
    Fattie over 5 years
    This would have to be the most "hidden" thing in all of computing :O
  • Fattie
    Fattie over 5 years
    bounty paid to spectacular answer, @skyline75489 :)