How to Run a Custom Shell Script During an XCODE Build

Right click on the specific target in XCODE

You can enter your shell script like this, here is a sample script to list available variables.

Build and Run and come open build results to see your script results.



Xcode 4 build setting variables for scheme scripts

转自:http://stackoverflow.com/questions/5319989/xcode-4-build-setting-variables-for-scheme-scripts

Apart from that, if you select "None", there will be a bunch of environment variables set by Xcode. You can discover all of them by doing something like printenv > ~/Desktop/printenv.txt to have them dumped to a text file.

Some of the more useful environment variables include ARCHIVE_PATHSCHEME_NAMEUSER,ARCHIVE_DSYMS_PATHARCHIVE_PRODUCTS_PATH.




你可能感兴趣的:(shell,xcode,Scheme,Build,archive,variables)