Where Is the Run Script and Build Phase in Xcode

Where is the Run Script and Build Phase in Xcode?

It is still there. Make sure you click everywhere indicated in red in the image below.

Sample Image

Xcode - How to run script just before build starts

You need to add a build phase. Go to the project file, Build Phases, click Editor on the tool bar menu, add Build Phase, Add Run Script... You can select and drag the script to put it before/after anything.

Editing a run script build phase in XCode

In xcode project tree, click on targets, then pick the target for which you added script. Each time you add new script/event it will show up as a new grey folder in target's subtree. Pick folder named 'Run Script', right click, select 'Get info': script body will be in 'General' tab.

If you have multiple scripts, you probably would want to rename them in that target tree.

How to run multiple bash/sh scripts in xcode 5 during build phase?

you can run as many bash scrips as you like at any point in the build phase.

select your target, then either:

  • from the menu: Editor -> Add Build Phase -> Add run script build phase.
  • Click the little "+" icon in the top left of the build phases window.

you can then drag the build phases into which ever order you need.



Related Topics



Leave a reply



Submit