Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build fails with "Command failed with a nonzero exit code"

Tags:

xcode

When I try to build my app with Xcode, an error interrupts the build process:

Command CompileStoryboard failed with a nonzero exit code

Sometimes, it shows this error instead:

Command CompileSwift failed with a nonzero exit code

I have New Build System turned on.

What can I do to fix this?

like image 862
Tamás Sengel Avatar asked Oct 11 '17 14:10

Tamás Sengel


2 Answers

Closing Xcode for me didn't have an effect. Instead, I cleaned the project using CommandShiftK.


I also found another reason: I had a storyboard reference to another storyboard which I had removed. The quick fix was deleting this.

enter image description here

like image 171
George Avatar answered Oct 25 '22 17:10

George


I also facing same issue in xcode 10 and tried all the solutions provided but nothing working.

Then I deleted all the files and folders of the following folder :

~/Library/Developer/Xcode/DerivedData

and it worked like a charm.

like image 40
Krishna Meena Avatar answered Oct 25 '22 19:10

Krishna Meena