Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display compiler output or custom build steps output when building with xcode?

How can I see the output from the compiler of from the custom build steps (pre-action or post-action)?

like image 417
sorin Avatar asked Mar 24 '11 13:03

sorin


People also ask

How to see Xcode build log?

Use the Xcode report navigator. To show the report navigator, either (1) click the rightmost button in the navigator bar at the top of the navigator area, which is on the left side of the workspace window, (2) select View > Navigators > Reports from the menu bar at the top of the screen, or (3) press ⌘ 9 .


4 Answers

You'll find (and you can watch during the build) the complete build output in the Log Navigator. That's the right most icon of the small icons just below the Run and Build buttons.

like image 171
Codo Avatar answered Oct 09 '22 01:10

Codo


Pre-action output at least appears in system.log and is visible in Console.app.

like image 29
Jonah Avatar answered Oct 09 '22 02:10

Jonah


EDIT: as pointed out in the comment below this answer only works for Build phase scripts, not pre action and post action scripts.


In Xcode 8 you need need to select your latest build in "Navigator -> Report Navigator". In the main area you will be able to see the complete build log including your output.

Navigator selection

Here is a simple "Hello world" echo

Log

like image 9
Nikola Lajic Avatar answered Oct 09 '22 01:10

Nikola Lajic


Per my answer here ( Is it normal for Xcode not to detect if a pre-action failed? ) this is an issue that's been discussed in the dev forums. Pre-/post-action script non-zero status doesn't seem to have an affect, nor does the output seem to make it into any logs.

like image 5
Joshua Nozzi Avatar answered Oct 09 '22 01:10

Joshua Nozzi