This script and build target will take the revision number from a Subversion repository (or a Git repository using git-svn) and substitute the last dotted component of the CFBundleVersion in your Info.plist file (you can put something like "1.0.0.xx" for your first run). Instructions: - Save update_build_number.rb into ${PROJECT_DIR}/Scripts (or wherever you want, but remember to change the paths accordigly in the build phase). - Add a new target to your project (I named mines as "Update FooBar Build Number"). In new target dialog choose from "Other" category "Shell Script Target". - In the "Run Script" build phase include the contents shown above. - Make your main target depend on "Update FooBar Build Number".