Running a Script While Building a Product
In the project editor, select the target to which you want to add a Run Script build phase.
Click Build Phases at the top of the project editor.
From the Add Build Phase menu in the lower-right corner, choose Add Run Script.
Configure the script in the new Run Script pane that appears.
Execute commands for a build task using a Run Script build phase. For example, you can archive files using
tar, send mail, write messages to a log file, execute AppleScript scripts, and so on. Any number of Run Script build phases are allowed in a target.
You can use any of the shell languages available in your system.
To change the title of the run script, click the title and edit the label.
The screenshot shows a Run Script build phase that prints the name of the target being built in the log navigator.
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-01-09)