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
If you don't want to download external dependencies (like Ben did), the following should work in most cases:
uuid=`grep UUID -A1 -a adhoc.mobileprovision | grep -io "[-A-F0-9]\{36\}"`
cp adhoc.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/$uuid.mobileprovision
Note that a UUID is composed of hexadecimal digits so the correct range is [-A-F0-9]
and not [-A-Z0-9]
.
Using the cupertino tool, the following snippet downloads all your distribution profiles from the Developer Portal and installs them.
ios profiles:download:all --type distribution
for file in *.*provision*; do
uuid=`grep UUID -A1 -a "$file" | grep -io "[-A-F0-9]\{36\}"`
extension="${file##*.}"
echo "$file -> $uuid"
mv -f "$file" ~/Library/MobileDevice/Provisioning\ Profiles/"$uuid.$extension"
done
cupertino (the ios
command) can be installed with sudo gem install cupertino
.