Method: XcodePages.marketing_version

Defined in:
lib/XcodePages.rb

.marketing_versionObject

Answers the project “marketing version” using Apple’s agvtool. The marketing version is the “bundle short version string” appearing in the bundle’s Info.plist. Cocoa only uses this for display in the standard About panel.

If the current marketing version is symbolic, answers the value of the symbol by looking up the value in the Unix environment. This assumes that Xcode provides the variable; and also assumes that Xcode addresses any nested substitution issues in scenarious where symbols comprise other symbols. Hence if agvtool reports a marketing version equal to ${CURRENT_PROJECT_VERSION}, the reply equals the value of CURRENT_PROJECT_VERSION found in the environment.



51
52
53
54
# File 'lib/XcodePages.rb', line 51

def self.marketing_version
  mvers = %x(agvtool mvers -terse1).chomp
  mvers =~ /\$\{(\w+)\}/ ? ENV[$1] : mvers
end