Skip to main content

Finding Your UDID from an Unsigned IPA

To find the provisioned device UDIDs from an .ipa, you can use the script below. Intended for macOS, leverages the macOS Security framework.

Simply put your .ipa somewhere on your local disk, and execute the script to extract the UDIDs.

./get_udids.sh /path/to/application.ipa
#!/bin/bash
# Extracts and displays device UDIDs from an IPA's provisioning profile (macOS only)
IPA=$1
PROVISION=$(unzip -Z1 "${IPA}" | grep embedded.mobileprovision)
if [ -z "${PROVISION}" ]
then
echo "[!] unable to find provisioning profile"
exit 1
fi
echo "[+] found provisioning profile at ${PROVISION}"
unzip -p "${IPA}" "${PROVISION}" | security cms -D > /tmp/embedded.mobileprovision
echo "[+] UDIDs:"
awk '/ProvisionedDevice/, /\/array/' /tmp/embedded.mobileprovision | awk -F'<string>|<\/string>' '$0=$2'
rm /tmp/embedded.mobileprovision