Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pityonline/35b99af4b8be500db93a2601a7ab09cd to your computer and use it in GitHub Desktop.
Save pityonline/35b99af4b8be500db93a2601a7ab09cd to your computer and use it in GitHub Desktop.
This script installs a .mobileprovision file via bash (no GUI session needed)
#!/bin/sh
# 2012 - Ben Clayton (benvium). Calvium Ltd
# Found at https://gist.github.com/2568707
#
# This script installs a .mobileprovision file without using Xcode. Unlike Xcode, it'll
# work over SSH.
#
# Requires Mac OS X (I'm using 10.7 and Xcode 4.3.2)
#
# Usage installMobileProvisionFile.sh path/to/foobar.mobileprovision
if [ ! $# = 1 ]; then
echo "Usage: $0 (path/to/mobileprovision)"
exit
fi
mp=$1
uuid=$(grep -aA1 UUID ${mp} | grep -o "[-a-z0-9]\{36\}")
echo "Found UUID: $uuid"
target="$HOME/Library/MobileDevice/Provisioning Profiles/$uuid.mobileprovision"
echo "Copying to $target..."
cp "${mp}" "$target"
echo "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment