top | item 8033960

Automatic Build Numbers in Xcode

12 points| sprint84 | 11 years ago |nerds.weddingpartyapp.com | reply

12 comments

order
[+] btn|11 years ago|reply
It looks like this is a re-invention of agvtool(1)---which ships with Xcode, will synchronise updates across all versioned targets in a project, and has options for differentiating marketing vs. development numbers and generating source files.

https://developer.apple.com/library/mac/documentation/Darwin...

https://developer.apple.com/library/ios/qa/qa1827/_index.htm...

[+] sprint84|11 years ago|reply
That's great, I also didn't know it existed. The only thing I need to check is if it will copy the updated values to the archived ipa.
[+] jinushaun|11 years ago|reply
Had no idea this existed! Apple docs... Always full of surprises.
[+] SurfScore|11 years ago|reply
I've been using a version of this for about a year now. I even modified the script to work with two build targets. The only problem is that every time you press the "play" build/run button it increments the build number, with or without any changes actually being made to the app.

It isn't a huge deal, but when I'm loading the app onto multiple iPads via Xcode, it would be nice to keep the same build number.

[+] sprint84|11 years ago|reply
In the post, there is a workaround for the increment at each build/run. You just need to be sure to run the script only in Release
[+] luketheobscure|11 years ago|reply
Should be titled "How to create conflicts with every commit".
[+] sprint84|11 years ago|reply
The script runs only when you Archive.