Tag Archives: xcode

How to increment build number on every “Build” you perform in xCode Project

These are 5 steps that will allow you fully automate process of incrementing a build number in xCode project:

  1. Open your xCode project and go to Target Settings -> Build Settings -> Switch to show ALL settings
  2. Scroll down to Versioning tab and find option called Curent Project Version. Double click on it's value and set it to be the number of build you want increment to start from.
    Set Curent Project Version in xCode
  3. Now switch to Build Phases tab
  4. Click on + icon and select "New run script phase"
    Build Phases
  5. Click on newly created run script and copy next code snipped:


    "${DEVELOPER_BIN_DIR}/agvtool" next-version -all

    Auto increment build bumber xCode script

You all set! Now press command + B to build your application and see your Build Number automatically increments.
So what happens, is that on every build you perform xCode will execute terminal command that will instruct agvtool to increment your build number.

Happy coding!

1,577 total views, 4 views today