iOS Versioning with agvtool

originally posted on mobilerockstars:

When search around how to update version number of an iOS project, most of the result is about how to update the info.plist file using scripts.

Actually, apple provides a command line tool called agvtool to update the version numbers for us. It’s simple and gets the task done.

The thing is, before you know it, it may not be obvious about how to start. So here are the steps.


  1. Setup Xcode project to use apple’s scheme for versioning
    In project build settings, set Versioning System to “Apple Generic”
    Set Current Project Version to the current build version of the project.
  2. In command line, check the current build version of the project: 
    agvtool what-version
  3. Set the build version number based on what we got in step 2 and what need to set for next build version.
    agvtool new-version -all new_version_number
  4. Check the current marketing version of the project:
     agvtool what-marketing-version
  5. Set the new marketing version of the project based on what we got in step 4 and what we need for next marketing version.
     agvtool  new-marketing-version new_marketing_version_number

If you want to increase the version number to the next highest integral value, use agvtool bump -all instead.


  1. OS X Man Page for agvtool
  2. Setting iPhone Application Build Versions
  3. Technical Q&A QA1827:Automating Version and Build Numbers Using agvtool

TDD v.s. BDD


Cedar and Calabash-iOS Win!

Software testing - Wikipedia, the free encyclopedia

Test Levels and Test Types are two angles to think about different tests.

Test Level

There are generally four recognised levels of tests: unit testing, integration testing, system testing, and acceptance testing.

Test Type

  • Installation testing
  • Compatibility testing
  • Smoke and sanity testing
  • Regression testing
  • Acceptance testing
  • Alpha testing
  • Beta testing
  • Functional vs non-functional testing
  • Destructive testing
  • Software performance testing
  • Usability testing
  • Accessibility testing
  • Security testing
  • A/B testing
  • etc.

In Objective-C, an object’s life cycle and its ownership qualification are not the same thing. The former is about how long the object itself lives in memory. The latter is about the different behaviors of ownerships towards what the object refers to in the different stage of the objects’s life cycle.

If an object is declared with retainable object owner type, but without an explicit ownership qualifier, its type is implicitly adjusted to have __strong qualification.

As a special case, if the object’s base type is Class (possibly protocol-qualified), the type is adjusted to have __unsafe_unretained qualification instead.

Source: http://clang.llvm.org/docs/AutomaticReferenceCounting.html#objects