Skip to content

Instantly share code, notes, and snippets.

@carlosefonseca
Last active December 27, 2015 12:39
Show Gist options
  • Select an option

  • Save carlosefonseca/7327213 to your computer and use it in GitHub Desktop.

Select an option

Save carlosefonseca/7327213 to your computer and use it in GitHub Desktop.
Output the version and build of an iOS .ipa file.
#!/usr/bin/env bash
plist="/tmp/BAMInfo.plist"
zippath=`unzip -l $1 | egrep -o "Payload/.*app/Info.plist"`
unzip -p $1 $zippath > $plist
version=`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" $plist`
build=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $plist`
rm $plist
echo "$version ($build)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment