/ pbxproj

# iOS Application automatic smart versioning

Hi, today, we're going to review two gists that are really cool when you'd prefer not take care about the versioning of your iOS application.

Perhaps you already have tried to modify the version number after compiling, directly in XCode and by modifying the values of the .pbxproj file, encountered a complete crash of XCode because, it doesn't react well when its .pbxproj file is modified by someone/something else, once opened…

If so, there is a cool way to do it.

All you have to do is using this two gists :

• The first one will increment every time you build the project, so clearly, increments the build number version.
• The second one will increment the commercial version when the application is archived.

Let's see this with a concrete example :

Let's say I'm working on a project in XCode and its current version is :

• Marketing Version : 2.0.0
• Build Number : 143

Then, every time I'll build the project, the build number will increment. This means that the build number will take the next following values : 144, 145, etc.

And every time I will make an install by archiving the application, the build number will still increment, but the marketing will also increment by incrementing the last digit like so 2.0.1, 2.0.2, etc…

And this is a real good way to identify any product version for you, automatically.

Here are the scripts :