Xcode versioning with agvtool

by @jehiah on 2011-12-08 10:30
Filed under: All, Programming, Xcode, agvtool, iOS

Thanks to a tip from @adamjernst, and contrary to my suggestion yesterday to use PlistBuddy, this is a post about a much better way to increment build numbers with agvtool

One day I should read the entire man pages front to back because I've never heard of agvtool. It is however, the Apple provided "generic versioning tool for Xcode projects". If that sounds exactly like what's needed, it is.

I'm largely following this great walkthrough in setting up agvtool by @th_in_gs.

Using agvtool consists primarily of:

  • setting CFBundleShortVersionString to the marketing version (ie: 1.0.0)
  • setting CFBundleVersion to the integer build number
  • setting Build Settings->Versioning->Versioning System to Apple-Generic for all targets
  • setting Build Settings->Versioning->Current Project Version to the CFBundleVersion value for all targets
  • adding a run-scripts build phase with /usr/bin/agvtool next-version -all
Subscribe via RSS ı Email
© 2021 - Jehiah Czebotar