0

I am looking for a automated way to increase the app version and / or build nr. Is there a way to achieve this with XCode? I am using built in git for versioning. So I actually would expect that git the version number is somehow controlled via git. At least that is how other versioning / configuration management tools work. I came across the possibility of using the agvtool command, but this thread (iOS, XCode 4.2) Setting bundle version using Git post-commit hook causes my project to turn into a Mac project

made me not really using it. Is there an out-of-the-box feature for this?

Thanks

Community
  • 1
  • 1
renesteg
  • 551
  • 1
  • 9
  • 24
  • This looks like a duplicate of http://stackoverflow.com/questions/9258344/xcode-better-way-of-incrementing-build-number – Monolo Feb 19 '12 at 12:37
  • Thanks Monolo and yes it is pretty much what I am looking for. However, I was expecting some simple options, rather than adding scripts. I am a bit concerned about the authors note "I hope this won't destabilise Xcode like the previous solution did.". Do you know if it is a stable solution and also works fine with XCode 4.2? Thanks. – renesteg Feb 19 '12 at 12:44
  • 1
    I use the PlistBuddy myself in a script that reads the svn version number, and it works without any problems. Truth be told, I run the script in a secondary target that is built before the main target, if that has any influence (it could have). – Monolo Feb 19 '12 at 12:50
  • Thanks Monolo, works perfectly. Have a great weekend ahead. – renesteg Feb 19 '12 at 13:45

2 Answers2

0

I would recommend the use of autorevision.

Specifically I would recommend looking at the xcode example, since it is explicitly setting up one header file for use in the code and another one for info.plist prepossessing. the autorevision website has a walkthrough for setting this up in xcode.

dak180
  • 71
  • 1
  • 5
-1

I am looking for a automated way to increase the app version and / or build nr

If it's a text, written somehow somewhere inside versioned code, Git-boys can use smudge|clean filters (read "Keyword Expansion" chapter).

I'm mad... At least I wrote about Git-filters here, at SO, already a lot of times. When SO-search will be used (before asking question again and again) by SO-users, especially new?!

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110