我得到一個我想用XCode編譯的iOS項目。
當我建造它,我得到以下錯誤:
iOS項目的命令腳本問題
(!)Run custom shell script 'Get App Version'
_________________________________________________________________
| PhaseScriptExecution Get\ App\ Version /Users........./Script- 9AAC7B315646546DC5.sh
| cd ....
| export ....
| ....
| long scripts
| ....
|_________________________________________________________________
sed: 1: "s/CURRENT_VERSION/There ...": unescaped newline inside subtitute pattern
Command /bin/sh failed with exit code 1.
在該項目中,當我去到目標>構建階段就沒有運行腳本階段。
編輯
我發現劇本中 '構建階段'> '獲取應用程序版本'
Shell: /bin/sh
Version='agvtool vers -terse'
sed -e "s/CURRENT_VERSION/$Version/g" Resources/App/version.h.tpl > GeneratedFiles/version.h
如果我添加echo $Version
我得到以下
There are multiple projects in this directory. agvtool does not work with multiple projects in the same directory. agvtool - Apple-generic versioning tool for Xcode projects usage: agvtool help agvtool what-version | vers [-terse] agvtool [-noscm | -usecvs | -usesvn] next-version | bump [-all] agvtool [-noscm | -usecvs | -usesvn] new-version [-all] <versNum> agvtool [-noscm | -usecvs | -usesvn] tag [-force | -F] [-noupdatecheck | -Q] [-baseurlfortag] agvtool what-marketing-version | mvers [-terse | -terse1] agvtool [-noscm | -usecvs | -usesvn] new-marketing-version <versString>
sed: 1: "s/CURRENT_VERSION/There ...": unescaped newline inside substitute pattern
Command /bin/sh failed with exit code 1
所以你已經檢查了所有的目標>構建階段,如果他們中的任何一個包含此代碼?他們不需要被命名爲「運行腳本」。 –
是的,我檢查了它 –
如果它不在你使用的構建方案中,而不是在目標>構建階段,那麼我就沒有想法。 –