Skip to content

Instantly share code, notes, and snippets.

@kukat
Created November 28, 2013 07:33
Show Gist options
  • Select an option

  • Save kukat/7688445 to your computer and use it in GitHub Desktop.

Select an option

Save kukat/7688445 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ $# == 1 ]
then
echo "UDIDs inside IPA: $1"
unzip -p "$1" Payload/\*.app/embedded.mobileprovision | grep -a "[a-f0-9]\{40\}"
elif [ $# == 2 ]
then
echo "Searching UDID: '$2' inside: '$1'"
unzip -p "$1" Payload/\*.app/embedded.mobileprovision | grep -a "[a-f0-9]\{40\}" | tr -d ' ' | grep "$2"
fi
@kukat
Copy link
Author

kukat commented Jan 21, 2014

Usage:

List all UDIDs that included in xxx.ipa

cipa xxx.ipa

Output:

UDIDs inside IPA: xxx.ipa
<string>cc818943648d0877eeee2e9a3e7267a277303cdb</string>
<string>cc84587f704e8b65eeeeace310ec5346132e1cdb</string>
<string>cc5f27eb2f26db09eeee2b9b59701ce5090b4cdb</string>
<string>ccc2c2e9f24f5afceeeeee90ba9d002b04a8ecdb</string>

Check whether one UDID is included

cipa xxx.ipa cc5f27eb2f26db09eeee2b9b59701ce5090b4cdb

Output:

Searching UDID: 'cc5f27eb2f26db09eeee2b9b59701ce5090b4cdb' inside: 'xxx.ipa'
<string>cc5f27eb2f26db09eeee2b9b59701ce5090b4cdb</string>

@kukat
Copy link
Author

kukat commented Jan 21, 2014

NOTE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment