Search code examples
iosiphonexcodesvnrun-script

Getting current revision from SVN before compiling in xCode


i'm trying to get the current SVN version before compilation, but xCode(5.1) start compiling files before running the custom shell scripts.

to get the SVN revision i follow this example:

i add a run script which get the current revision and insert it in the revision.h file but this must be before compile:

REV=`svnversion -n`
echo "#define kRevision @\"$REV\"" > ${PROJECT_DIR}/revision.h
  1. How can i run this script before compile.
  2. Is there an other what to get the current SVN version and use it at application run time.

Solution

  • i have fixed this (sorry to answer to my own question)

    the problem was very simple : i was modifying the cote " ` " by " ' ".