In Xcode 6 - 10:
Choose Product -> Scheme -> Edit Scheme. Change the Build Configuration under the Info tab.
Build Configuration
Info
Shortcut: hold Alt⌥ and click the run button ▶.
▶
The easiest way with a project that has the default set up for schemes is just to do Product -> Build For -> Profiling.
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.