Elliot Chance
Elliot Chance

Reputation: 5746

Xcode 4: Add Build Phase After Run?

Is is possible to run a shell script after the build and run of a target?

I don't care about the exit code of the execution just that the script is run every time after execution.

Upvotes: 0

Views: 370

Answers (1)

Daij-Djan
Daij-Djan

Reputation: 50129

after run

modify the scheme for running and add a post-action script

  • click on the scheme in the upper left popup.
  • select edit scheme
  • expand the selected entry in the listview that pops up. (Called Run XY)
  • click on Post-Actions
  • and there click the + button
  • now select add new run script.

after build

as last phase of the build :)

  • got to your project
  • there click on build phases
  • and there click the + button
  • now select add new script phase.

=> drag and drop the box for this new build phase to where in the process you want it. in your case, drag it to the bottom of the list, below copy bundle resources

Upvotes: 1

Related Questions