For XCode only!
When you have lots of testing to do for some other tester, you may need a short extend version number for easy marking bugs, of course it’s good that using build times, here I find an acceptable way.

  1. add build script for your project target. Add>New Build Phase>New Run Script Build Phase.
    1. input shell script like this:
    2. DATE=`date +%y%m%d`echo “CURRENT_PROJECT_VERSION = ${DATE}”> version.xcconfig
  2. build and then you will get a file named “version.xcconfig” in project root folder, add this to your project(do not copy, you wont)
  3. open project info, go to Build, you will find a droplist on the bottom of the window by label “Based on:” choose “version” (it’s the file name we just created)
  4. edit Info.plist. find Bundle version. change it to some you like by this format:
  5. 2.1.${CURRENT_PROJECT_VERSION}

OK. We will get a update version number!