WARNING : This content was auto generated from a backup file, links and images may be broken.I recently had a lot of trouble with building and distributing AD-HOC builds with that in mind I set out to not to fall into the same trap twice (lots of time wasted) and automate the process using a shell script. This would be able to compile the desired build configuration grab any documentation I wanted to go along with said build and include a valid mobileprovision (preferable the one it was built with). The script would then package up all this data into an object that could be directly distributed to the test group.
The result is a simple script that you can download it here.
I struggled with the selection of the correct mobileprovision I initially had the provision file in the project and just directly copied it which worked fine for a while. I then ran into the problem of having to remember to update it when adding another device to the provision (after I copied to the organizer I would also have to update all my projects). The solution that I ended up using was to use grep to search the provision folder for the name’s contained inside mobileprovision file and then copy that one into the output folder. It’s not a perfect solution but better than having two copies of the provision lying around one in the project and another in the directory used by the Organizer. If you would like to use the script please feel free (you will need to alter it slightly for your project). I am in the process of writing up some simple steps on how to integrate the script into your xcode project they should be up soon.
Note : The Package script creates both a zip and a dmg they both contain the same information I did it just for completeness.
[UPDATE :: Setup Instructions can be found here]