2011-12-21 42 views
34

我添加了一個運行腳本生成階段,我的Xcode項目,劇本只是新增運行腳本階段的Xcode,但沒有任何反應

echo "Hello" 

我不是在調試控制檯或任何seing招呼,所以我猜想我的腳本在構建時沒有被執行。

Build Phases

任何想法?

(編輯:導航器只顯示)

GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011) 
Copyright 2004 Free Software Foundation, Inc. 
GDB is free software, covered by the GNU General Public License, and you are 
welcome to change it and/or distribute copies of it under certain conditions. 
Type "show copying" to see the conditions. 
There is absolutely no warranty for GDB. Type "show warranty" for details. 
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all 
Attaching to process 1955. 
**** UNIT TESTS **** 
Success: 33 tests passed. 
Test time: 0.02 seconds. 
******************** 
[Switching to process 1955 thread 0x13c13] 

回答

69

的XcodeView > Navigators > Show Report Navigator

報告Navigator是在Xcode側邊欄中的 「聊天泡沫」。

Report Navigator in Xcode

選擇您最近Build從左側邊欄。

然後在標籤欄中點擊All Messages查看您的運行腳本構建階段的輸出。

View Run Script Build Phase output in Xcode 6

傳統的Xcode版本:

的Xcode 6+View > Navigators > Show Report Navigator

的Xcode 5View > Navigators > Show Log Navigator

的Xcode 4View > Navigators > View Log Navigator

30

你會看到在構建日誌的輸出。

構建成功後,進入 「查看 - >導航器 - >顯示報告導航」(CMD + ),並檢查最新的日誌。

+0

我剛剛更新了我的問題,顯示出現在導航器中... – Goles 2011-12-21 15:38:03

+0

您正在看的是調試日誌。這顯示了運行程序的結果。你應該看看的是「構建日誌」,它將顯示構建過程的輸出。 – Vishal 2011-12-21 16:03:38

0

在Xcode中6:View -> Navigators -> Show Report Navigator

在左側欄中,根據By Group選項卡上,選擇最新的Build不管什麼目標,你剛剛建成。

在中間一列中,選擇All Messages選項卡,構建腳本的輸出應該在那裏。

0
logPath=~/Library/Logs/MyLog.log 
cd ~/Library/Logs 
touch MyLog.log 
echo "for example: ${SRCROOT}" >> $logPath 
# I feel so comfortable, now look to: 
# Console.app > sidebar > Files > ~/Library/Logs > MyLog.log 
相關問題