4uccxw
Last Updated: February 25, 2016
·
613
· sragu
E9e422ea76f86f10a5ebfaf9b3aa46fa

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
Say Thanks
Respond