34

What do the following actions in Xcode 4 do?

  • Build for Testing
  • Build for Running
  • Build for Profiling
  • Build for Archiving

I'm not sure when to use each of these (or whether to use any of them at all).

Dov
  • 15,530
  • 13
  • 76
  • 177
harshit2811
  • 827
  • 1
  • 7
  • 21

1 Answers1

34

Running is for running your app (on the Mac for Mac OS X, in the simulator or on the device for iOS).

Profiling is for running your app with Instruments (for finding memory leaks, bottlenecks etc.).

Testing is for running unit tests.

Archiving is building a distributable package of you app (incl. Ad-hoc iPhone distributions and upload to the App Store).

Codo
  • 75,595
  • 17
  • 168
  • 206
  • 1
    Adding that for each of these actions, the options used to build the target might be slightly different (release vs. various levels of debug, etc.) and you may only want to build for it so you can run an external tool yourself. – Joshua Nozzi Apr 07 '11 at 14:03
  • Thanks for your quick reply. still i hv one query. i want to give my app to my tester via mail. Which will be better to build app for testing? Whether i hv to give "archiving app" or "testing app" ?? – harshit2811 Apr 08 '11 at 05:56
  • 1
    To give your app to your testers, build it for "Archiving". At the end of the build, the Organizer window should open, show the newly build version of your app. Then you can use the "Share" button to save a package to send to your testers. – Codo Apr 08 '11 at 08:05
  • 6
    So `Build` is the same as `Build for running`? – Iulian Onofrei Jan 23 '17 at 11:42