向 Xcode 添加了运行脚本阶段,但没有任何反应
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8589365/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Added Run Script phase to Xcode, but nothing happens
提问by Goles
I added a Run Script build phase to my Xcode project, the script is just
我在我的 Xcode 项目中添加了一个运行脚本构建阶段,脚本只是
echo "Hello"
I'm not seing hello in the debug console or anything, so I guess my script is not being executed when I build.
我没有在调试控制台或任何东西中看到 hello,所以我猜我的脚本在我构建时没有被执行。
Any ideas ?
有任何想法吗 ?
( Edit: The navigator just shows )
(编辑:导航器只显示)
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]
回答by pkamb
Xcode: View > Navigators > Show Report Navigator
代码:View > Navigators > Show Report Navigator
The Report Navigator is the "chat bubble" in the Xcode sidebar.
报告导航器是 Xcode 侧栏中的“聊天气泡”。
Select your most recent Build
from the sidebar on the left.
Build
从左侧的边栏中选择您最近的。
Then click All Messages
in the tab bar to see the output of your Run Script Build Phase.
然后All Messages
在选项卡栏中单击以查看运行脚本构建阶段的输出。
Legacy Xcode Versions:
旧版 Xcode 版本:
Xcode 6+View > Navigators > Show Report Navigator
Xcode 6+View > Navigators > Show Report Navigator
Xcode 5: View > Navigators > Show Log Navigator
Xcode 5:View > Navigators > Show Log Navigator
Xcode 4: View > Navigators > View Log Navigator
Xcode 4:View > Navigators > View Log Navigator
回答by Vishal
You will see the output in the build log.
您将在构建日志中看到输出。
After build is successful, go to "View -> Navigators -> Show Report Navigator" (cmd+8) and check the latest log.
构建成功后,进入“查看 -> 导航器 -> 显示报表导航器”(cmd+ 8)并查看最新日志。
回答by Prabhu.Somasundaram
The quickest way that I found is by using the below echo command in my Run Script with "warning:" in it. Xcode threw a warining. Hence confirmed your script is getting executed
我发现的最快方法是在我的运行脚本中使用以下 echo 命令,其中包含“警告:”。Xcode 发出警告。因此确认您的脚本正在执行
echo "warning: RUN SCRIPT in ACTION"
you also can try echo "error: RUN SCRIPT in ACTION"
你也可以试试 echo "error: RUN SCRIPT in ACTION"
回答by Jaymon
In Xcode 6: View -> Navigators -> Show Report Navigator
在 Xcode 6 中: View -> Navigators -> Show Report Navigator
On the left column, Under the By Group
tab, select the latest Build
for whatever target you just built.
在左列的By Group
选项卡下,Build
为您刚刚构建的任何目标选择最新版本。
In the middle column, select the All Messages
tab, the output of your build script should be somewhere in there.
在中间列中,选择All Messages
选项卡,构建脚本的输出应该在其中的某个位置。