In xcode 3, using a bash script, I could run xcode from the command line, then take the files in the build directory and zip them up into a .ipa file, allowing for a fully automated build process for my adhoc iOS distribution. Anytime there is human intervention, there is the possibly for error.
Under xcode 4, this seem to be not possible anymore. The build directory has been replaced with a DerivedBuilds folder and it uses some obfuscation naming, so it's not possible to let an external script find the files.
In xcode 4, after the build, I need to run Produce->Archive, then selected the file in the organizer, then select save, then navigate to the final folder and name the file and hit save. This is a very error prone process better left to machines.
So, is there a way to go from a clean build all the way to a signed .ipa file? I've got to believe this is possible, there is no way people with automated build processes are having to do this step by hand.
Does anyone know how to do this?
Sure, the script I have been using in my continuous integration environment is available at https://gist.github.com/949831 That might do more than you need but should be able to serve as a base for whatever steps you want to include in your build process.
As you noted it would be hard to predict the derived data path Xcode will use but it is not too hard to located it in the build output as part of the build script.