How to get target's version(The version of you APP) in Ruby
or Xcodeproj?
I have tried sdk_version
in AbstractTarget
with Xcodeproj, But it returns nil.
If Xcodeproj
doesn't support it. How to get the version by Ruby
?
I did this in Ruby using the plist gem, like this:
require 'plist'
info = Plist.parse_xml('path/to/Info.plist')
puts info["CFBundleShortVersionString"]
puts info["CFBundleVersion"]
I hope it helps.