Try cd'ing into the Xcode project directory before the script runs, since it can't find the project otherwise.