News for hackers. Stuff that matters.
Re:Automatic Build Numbers in Xcode by btn on Monday July 14, 2014 @09:04PM (#8034156)
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...

Re:Automatic Build Numbers in Xcode by sprint84 on Tuesday July 15, 2014 @11:38AM (#8037043)
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.
Re:Automatic Build Numbers in Xcode by jinushaun on Tuesday July 15, 2014 @02:03AM (#8035021)
Had no idea this existed! Apple docs... Always full of surprises.
Re:Automatic Build Numbers in Xcode by SurfScore on Monday July 14, 2014 @08:34PM (#8034059)
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.

Re:Automatic Build Numbers in Xcode by sprint84 on Monday July 14, 2014 @08:36PM (#8034065)
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
Re:Automatic Build Numbers in Xcode by SurfScore on Monday July 14, 2014 @08:49PM (#8034108)
Well I'd like to know build numbers internally, just only when I change things. So if I put build 12500 on 3 iPads, I can track the crashes.
Re:Automatic Build Numbers in Xcode by sprint84 on Monday July 14, 2014 @08:53PM (#8034130)
What do you mean? Do you want to read the build number on runtime? There is a way to do that, when you put them in the plist, just run [[NSBundle mainBundle] infoDictionary][@"CFBundleVersion"] to get the NSString.
Re:Automatic Build Numbers in Xcode by SurfScore on Tuesday July 15, 2014 @12:45AM (#8034824)
Say I have 3 iPads in the office, and I want to load a build on each of them. I know I can use Testflight or similiar, but the easiest is to just plug them into my computer and press the play button. If I do that, it increments the build number, so iPad #1 gets build 4031, iPad #2 gets build 4032, etc.
Re:Automatic Build Numbers in Xcode by sprint84 on Tuesday July 15, 2014 @11:36AM (#8037033)
No it doesn't, if you ensure it will run only on "Release". When you deploy an app to a device via Xcode, unless you specify differently, it will compile in "Debug", so that won't cause an increment. Every iPad will have the same build.
Re:Automatic Build Numbers in Xcode by luketheobscure on Tuesday July 15, 2014 @03:27AM (#8035209)
Should be titled "How to create conflicts with every commit".
Re:Automatic Build Numbers in Xcode by sprint84 on Tuesday July 15, 2014 @11:35AM (#8037016)
The script runs only when you Archive.
Re:Automatic Build Numbers in Xcode by luketheobscure on Tuesday July 15, 2014 @12:37PM (#8037440)
Which happens when you run Instruments.

I had a project with this exact setup about a year ago... The amount of time lost resolving conflicts wasn't worth it.