2

Is there any way to save all errors and warnings generated by Xcode to a target text file?

My current way of doing this is by copy-pasting and indenting every single error and warning, but that is rather time-consuming.

I am using Xcode 11.4.1 on macOS 10.15.2.

1
  • I can't believe what's the benefit of not being able to do it, and I can't believe that it's technically difficult for the world's largest company to write output to a text file Jul 15, 2022 at 8:27

1 Answer 1

1

I've since figured out how to do this.

Press Command 9 to display the "Report Navigator" (Or click on the view menu, select navigators, and then choose "reports".)

Find the entry for the target you built, and the "Build" entry. That shows the build report in the editor window.

There should be an "export" button at the top of the report editor window. If you click that it lets you save your build report to a text file.

Another way to do this is to build your project from the command line with a command like:

cd <project directory>
xcodebuild build -workspace <workspaceName>.xcworkspace -scheme <schemeName> -destination 'platform=iOS Simulator,name=iPhone 13' > <path-to-report-textfile>

(Where you replace <project directory>, <workspaceName>, , and ` with the values for your project. You might also want to set the destination platform to a different one.)

The last part of that command, > <path-to-report-textfile>, "pipes" the output of the build command to a file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .