1

I'm trying to update my marketing version using agvtool.

agvtool new-marketing-version 1.0.2

Setting CFBundleShortVersionString of project Newsgroup to: 1.0.2.

Updating CFBundleShortVersionString in Info.plist(s)...

Updated CFBundleShortVersionString in "Newsgroup.xcodeproj/../Newsgroup-Info.plist" to 1.0.2 Updated CFBundleShortVersionString in "Newsgroup.xcodeproj/../Test Classes/Tests-Info.plist" to 1.0.2

agvtool what-marketing-version

No marketing version number (CFBundleShortVersionString) found for Jambase targets.

Looking for marketing version in native targets... Looking for marketing version (CFBundleShortVersionString) in native targets...

Found CFBundleShortVersionString of "" in "Newsgroup.xcodeproj/../Newsgroup-Info.plist" Found CFBundleShortVersionString of "" in "Newsgroup.xcodeproj/../Test Classes/Tests-Info.plist"

Xcode is not open when I'm running these commands… Is there anything else I could be doing wrong or is agvtool broken under Xcode 4?

kubi
  • 48,104
  • 19
  • 94
  • 118

1 Answers1

0

I don't know if this is changed since Xcode 3.x, but you need to add CFBundleShortVersionString to the -Info.plist files. If you open the plist in Xcode it's called "Bundle Version Strings, short". Add that value to your plists, set the marketing version using avgtool, then get the marketing version out with agvtool what-marketing-version -terse1, which returns just the value of the first marketing version string it encounters.

kubi
  • 48,104
  • 19
  • 94
  • 118
  • What about for projects with multiple targets? I keep getting the wrong CFBundleShortVersionString, because it's picking the wrong target with agvtool mvers -terse1 – yujean May 11 '12 at 15:51
  • You can have multiple plist for multiple targets – Daniel Albert Oct 17 '13 at 15:14