Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command CompileSwift failed with a nonzero exit code in Xcode 10 [duplicate]

After updating to the latest version of Xcode at the moment (version 10.0) the project is unable to build because it found some errors regarding some "Command CompileSwift failed with a nonzero exit code" error.

How do I solve this errors? They appear in most of the Pods (I use CocoaPods) I use inside my project.

I have tried updating the pod version and the pods to the latest version available, but the problem is still there.

I have searched a lot through the web and there is very little information regarding this issue.

like image 229
Jordi Gámez Avatar asked Oct 20 '22 01:10

Jordi Gámez


2 Answers

For me, just cleaning project works using ShiftCommandK & OptionShiftCommandK.

like image 141
Mahgol Fa Avatar answered Oct 22 '22 13:10

Mahgol Fa


You're most likely not reading the entire error message. If you look above the "Command CompileSwift failed with a nonzero exit code" message you should find some specification like this:

enter image description here

In this example I had two files with the same name. Once I fixed it everything worked as it should.

like image 89
Samy Avatar answered Oct 22 '22 15:10

Samy