Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 13.3 build fails: Command EmitSwiftModule failed with a nonzero exit code

Tags:

xcode

ios

After upgrading to Xcode 13.3 the project no longer builds due error: Command EmitSwiftModule failed with a nonzero exit code.

Does anyone know what the problem could be? There're only warnings about using AnyObject instead of class in the protocols. I guess the problem is in some library. But where exactly the problem is — it's not clear, because Xcode does't even hint about it. Are there any ways to localize the error?

like image 459
Vladislav Kulikov Avatar asked Feb 27 '26 00:02

Vladislav Kulikov


2 Answers

Problem could be with one of your libraries/pods which needs to be updated .

You could export Failed Build Logs from Xcode Report Navigator - Export Log

These Logs could be valuable to check these type of unknown build failure issues where we are not sure of what library/file is actually impacting build process.

Usually the libraries impacting the build will be found towards end of logs. In my case I had to update an Pod for which I followed below steps.

1)Run pod deintegrate

2)Inside pod file mention updated pod version or you can simply remove any explicit version which is mentioned to get latest pod version

In my case I updated pod version as " pod 'CryptoSwift', '~> 1.4.0' "

3)Run pod install.

Everything should work well after that.

*** I have attached screenshot sample of end of logs where my impacted pod was mentioned before build failure message. Hope it helps anyone ***

enter image description here

like image 55
jayant rawat Avatar answered Feb 28 '26 16:02

jayant rawat


Remove @UIApplicationMain on the code, it worked for me. I reckon this firebase bug is associated with Xcode 13.3

Edit: Changed @main to @UIApplicationMain.

like image 24
Matthias Müller Avatar answered Feb 28 '26 15:02

Matthias Müller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!