Command /Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

Project Settings > Under "Targets", select your project > Build Phases > open "Compile Sources" and "Copy Bundle Resources". Check if any files are listed in red color. If so , just delete it. Then clean and run.

Worked for me.


Do a clean. product > clean . Terminal purge & reboot didn't work for me, cleaning did.


I had this same error and nobody seems to have an answer on StackOverflow that actually works. My problem was when I tried copying a project that was in a team repository. Turns out, in the ignore file, all files with the extension of *.pch were ignored from repository commits. This means that when I went to pull the project from the repo, the .pch file was missing, thus throwing this error.

Fortunately I had a copy of the project still and was able to just copy the .pch file over and I was then able to compile just fine.

Hope this helps?