-
-
Save squio/8f6284c2039444711290 to your computer and use it in GitHub Desktop.
Simple script to list the allowed UDID's inside an apple IPA package, to verify it's going to work on a specific users device.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Simple script to print out UDID's in apple IPA packaged apps. | |
# | |
# Syntax: list-ipa-udid.sh {my-application.ipa} | |
# | |
IPA=$1 | |
if [ -z "$IPA" ] | |
then | |
echo "Syntax: list-ipa-udid.sh {my-application.ipa}" | |
exit 1 | |
fi | |
TMP=`mktemp -d -t ipadump` | |
XML=$TMP/xml | |
XML2=$TMP/xml2 | |
# echo "Allowed UDID's in $IPA:" | |
# echo "* extract to $TMP ..." | |
mkdir -p "$TMP" | |
cp "${IPA}" $TMP/tmp.zip | |
cd $TMP | |
unzip -q tmp.zip | |
# find . | grep mobileprovision | |
PRO=`find . | grep embedded.mobileprovision` | |
# echo "check provisioning file $PRO ..." | |
security cms -D -i $PRO > $XML | |
# echo "provisioning content in $XML " | |
plutil -extract ProvisionedDevices xml1 -o $XML2 $XML | |
cat $XML2 | grep string | awk -F [\>\<] '{print $3 }' | sort | |
rm -rf $TMP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment