Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a release build with Xcode 4

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.

like image 373
Joey Avatar asked Mar 22 '11 05:03

Joey


People also ask

How do you do release build in Xcode?

Create an Xcode Archive. To test the exact conditions your app user's experience, create a release build. In your Xcode project's scheme editor, set the run destination to a device and adjust the archive task to the Release configuration. Then, choose the Archive option in Xcode's Product menu.

What is the difference between Debug and release in Xcode?

To summarize, by default, Xcode define two build configurations, Debug and Release. By default, Debug build configuration is used for development(run apps on Simulator or real devices by hitting run button on Xcode); Release build configuration is used for archiving(upload build to App Store Connect).


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

like image 193
Adam Bryzak Avatar answered Sep 19 '22 11:09

Adam Bryzak


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.

like image 32
Rick Bidlack Avatar answered Sep 23 '22 11:09

Rick Bidlack