- Install homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"- Install XMLStarlet for xml parsing:
brew install xmlstarlet- Export public key from the
.mobileprovisionwith the help of OpenSSL:
security cms -D -i embedded.mobileprovision | xml sel -t -v "/plist/dict/key[. = 'DeveloperCertificates']/following-sibling::array[1]/data[1]" | awk '{print $1}' | sed '/^$/d' | base64 -D | openssl x509 -inform der > publickey.pem