I\'m trying to automate the process of building apps for our clients using bash scripts running on a Mac Mini Server (OSX 10.7).
My script is based on the spectacul
Since asking this question, I've built a solution myself. The secret is to simply copy the file to the ~/Library/MobileDevice/Provisioning Profiles/ folder, but (here's the tricky bit) renamed to [The UUID].mobileprovision.
The UUID is held inside a text part of the file itself (in a plist). Unfortunately, the file also includes binary so 'defaults read' cannot read it. Luckily this guy has built a small command line utility to get the UUID (and some other things out again).
Here's my full working script:
https://gist.github.com/2568707