Skip to content

Instantly share code, notes, and snippets.

@edsnider
Created July 22, 2015 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsnider/4f47ba365fe633fb188c to your computer and use it in GitHub Desktop.
Save edsnider/4f47ba365fe633fb188c to your computer and use it in GitHub Desktop.
Get APK and IPA version numbers with Ruby
require 'ruby_apk'
require 'read_ipa'
# read version info from APK
apk = Android::Apk.new('<APK_FILENAME>.apk')
puts apk.manifest.version_name
puts apk.manifest.version_code
# read version info from IPA
ipa = ReadIpa::IpaFile.new('<IPA_FILENAME>.ipa')
puts ipa.version
puts ipa.short_version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment