Hi, I'm Hwee-Boon Yar

I write, ship and sell software products. iOS/OS X app developer based in Singapore, working remotely. This is my blog.

.

Need to run a code review on your codebase? Hire me

I wrote a response to a question about the difference between CFBundleVersion and CFBundleShortVersionString on the RubyMotion community forums and thought it's useful to make it available here especially since this applies to all iOS and OS X apps, not just those built with RubyMotion:

Click on the Apple icon in the Mac menu bar and choose About This Mac. Click "Version 10.xxx". You should see something like this:

Version 10.10.3 (14D113c)

CFBundleShortVersionString (10.10.3) is the version number and is the version number that is public and marketed to users. CFBundleVersion (14D113c) is the build number.

Naturally, you should increase the CFBundleVersion (build number) with every build, example for testing - TestFlight, HockeyApp.

You also (and only) increase the CFBundleShortVersionString (version number) when it's a new release, e.g. when Apple starts beta for 10.10.3, all builds should have version=10.10.3 instead of the previous 10.10.2 and all builds will have different build numbers.

This part is related to RubyMotion:

CFBundleVersion = version
CFBundleShortVersionString = short_version || version

So if you don't care about anything, use only version, and at least increment it everytime you have a new build submit for approval, testflight, HockeyApp, etc. RubyMotion will use the same value for both the version number and build number. IIRC, Xcode used to do the same thing until roughly 2014 or so where you had to explicitly specify both.

If you want to be fine and proper, update version with every build and increment short_version when you want to begin testing a new version.

Like this post? Follow me @hboon on Twitter.