Added Run Script phase to Xcode, but nothing happens

XcodeBuild

Xcode Problem Overview


I added a Run Script build phase to my Xcode project, the script is just

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.

Build Phases

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]

Xcode Solutions


Solution 1 - Xcode

Xcode: View > Navigators > Reports

The Report Navigator is the "chat bubble" in the Xcode sidebar.

Report Navigator in Xcode

Select your most recent Build from the sidebar on the left.

Then click All Messages in the tab bar to see the output of your Run Script Build Phase.

View Run Script Build Phase output in Xcode 6

Xcode Version changes:

  • Xcode 12: View > Navigators > Reports

  • Xcode 6: View > Navigators > Show Report Navigator

  • Xcode 5: View > Navigators > Show Log Navigator

  • Xcode 4: View > Navigators > View Log Navigator

Solution 2 - Xcode

You will see the output in the build log.

After build is finished:

  • Go to "View -> Navigators -> Show Report Navigator" from menu,
  • Or press cmd+9 shortcut (cmd+8 in older ExCode),
  • Then check the latest log.

Solution 3 - Xcode

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 "warning: RUN SCRIPT in ACTION"

you also can try echo "error: RUN SCRIPT in ACTION"

Solution 4 - Xcode

In 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.

In the middle column, select the All Messages tab, the output of your build script should be somewhere in there.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGolesView Question on Stackoverflow
Solution 1 - XcodepkambView Answer on Stackoverflow
Solution 2 - XcodeVishalView Answer on Stackoverflow
Solution 3 - XcodePrabhu.SomasundaramView Answer on Stackoverflow
Solution 4 - XcodeJaymonView Answer on Stackoverflow