Auto-incrementing Build Numbers in Xcode
Sunday, February 19, 2012, by Sebastian Dwornik

Add run script within XCode
Thanks goes to Fredrik Olsson's article and the helpful commenters that shared their own tweaks to this quick and simple solution.

Simply select the app 'Target' and add the following text to a 'Run Script' within your 'Build Phases' tab.




# Auto Increment Version Script
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"


XCode run script insert


After which, whenever you perform a Build operation, the "Build" number will automatically be incremented.


XCode run script results


Optionally, if you have multiple 'Targets' and want to keep their 'Build' numbers in-sync, you can simply just modify the script to update both .plist files during a Build operation.

# Auto Increment Version Script
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/ChooseBot/ChooseBot-Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/ChooseBot/ChooseBotLite-Info.plist"

Make sure you then add 'Run Script' within both of your Target 'Build Phases' tab.


Whether you choose to display this 'Build' number in your app is up to you, but it helps track the app a little better.

 

It’s more than just custom software. It’s a relationship.
Thursday, February 02, 2012, by Sebastian Dwornik

The customer is always right

Well, .. no, not really.

While developers do need to fully understand the customer’s expectation, the customer's don’t always realize the “right” way to execute it.  That’s the developer’s domain in designing the app properly.

Developing custom software for clients is much more than just writing code.

It requires a level of ownership and responsibility to execute a polished product with an accurate UX experience that doesn’t resemble a VB app from 1997.

Just because the client wants a text field in the middle of the screen, doesn’t mean it belongs there.

Developers who care about such design details usually cost a little more, but the work done is then also of a higher caliber.  Because human-to-human-to-machine translation is not trivial and requires patience.

And in the end, it’s more than just custom software.  It’s a relationship.


bad user requirements

 

Welcome to my App World

My name is Sebastian Dwornik and I am an entrepreneur located near Toronto, Canada.

Here you will find my thoughts on all matters regarding software, design, business, and sometimes life in general.

Have feedback? Don’t be shy and post your comments within the forum.


CONNECT WITH US

Twitter Facebook
Linkedin Rss

profile for Sebastian Dwornik at Stack Overflow, Q&A for professional and enthusiast programmers

Categories
Archives


Past archives (2013)

Past archives (2012)

Past archives (2011)

Past archives (2010)

Past archives (2009)

Past archives (2008)

 
 
Copyright © 2007 - 2017 Applied PDA Software, Inc. Fresh Lime Studio
All products mentioned on this web site are owned and copyrighted by their respective companies.