Command CompileSwift failed with a nonzero exit code

recently when I was doing ios development I had this problem:

Command CompileSwift failed with a nonzero exit code

the key is that there is no error in the code, and then the project will run normally, so why would there be such a strange error in the compilation?A random Internet search, said to change the contents of the PodFile, I am a small new, do not dare to change the podFile thing, in case something new problem. After a few final searches, you can simply press the following shortcut combination:

shift + commond + k


command is available as clean build folder, which is also available on the xcode toolbar product. After analysis, this error should be caused by the compilation cache of Xcode, but there is no problem with the project code itself and it can run normally. As long as the previous compilation cache is cleared, it will be ok to recompile and run.

problem solved!

Read More: