reading the ios provision name from ipa
When distributing your apps for OTA installation, its necessary to make sure you are signed the ipa with right provisioning file. Sometimes its easy to sign with the wrong provisioning esp. if the provisioning is auto selected by xcode. Say If you have a wildcard app id, there are chances that it get applied whereas you wanted the app to be signed with enterprise account.
Its quite easy to extract the app and identify the mobileprovision used to sign the app. The following is just a one liner that will do the same.
Just the save this file as iosprovisionname
#!/bin/sh
unzip -p $1 Payload/*.app/embedded.mobileprovision | strings | grep -A1 '<key>Name</key>' | tail -n1 | awk -F'[<>]' -v file=$1 '{print $3, " -> ", file}'
https://gist.github.com/sragu/8142755#file-ios_provision_name
Then
chmod a+x ios_provision_name
before you execute it,
ios_provision_name /app/hello.ipa
and it prints:
Provision Name -> app path
Sample ENT -> /app/hello.ipa
Written by Srinivasan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Provisioning
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#