Search code examples
iosxcode4

How do I add an external build tool target to an iOS xcode4 project


I have an iOS app project. I want to add a target that calls a script to generate some files, if I add an "external build tool" target, I can only do this with a MacOS X target type. If I try to "build" the target it barfs with the error "invalid run destination".


Solution

  • Under your Application Target, click on the Build Phases tab... You can add a Build Phase to run a shell script by going to Add Build Phase -> Run Script and you can then paste your shell code or drag a file to be run every time you build the target