How do I stop Xcode 9 from continuously building or at least make it not run build scripts?

Viewed 7227

After migrating to Xcode 9, I noticed that it constantly fully builds my project. I found that it is somehow related to the "show live issues" setting. Disabling that setting stops builds, but it makes development inconvenient.

I would like to disable this continuous build loop, or make it work without launching all build scripts.

My custom build scripts contain linting and formatting, so what happens is, I try to edit a file, but Xcode starts building, thus launching the formatting routine that changes exactly the same file I am trying to edit.

2 Answers

After upgrading the Xcode version to Xcode 9.0, I also faced a similar issue and my CPU usage was jumping upto 50% just because of Xcode. However I could solve it by following the steps below.

In the Toolbar go to: File -> Project Settings / Workspace settings change Build System to Standard Build Settings under Shared Workspace Settings. Also under Per-User workspace Setting change Build System to Standard Build System.

The release notes also say the following.

"Xcode 9 includes a new build system written from scratch in Swift. It is designed for higher reliability, and it catches project configuration problems that the standard build system does not. The performance of the build system (not including compilers, linkers, and other build tools) has been dramatically improved."

So there could be a possibility that there are still bugs in the new build system.

Related