Tips On Solving The Error “Command CompileSwiftSources failed with a nonzero exit code xcode 13”

If you had updated your device to the latest version of Xcode and started to build your Swift file, you might have received a build error “Command CompileSwiftSources failed with a nonzero exit code xcode 13”. This error seems to be common for many developers. This blog will discuss this error and how you can resolve it.

How To Fix The Error “Command CompileSwiftSources failed with a nonzero exit code xcode 13”?

When attempting to run pod cache clean –all, delete the derived data, then perform a pod upgrade before launching a project on Xcode13, you may get the following problem.

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'Alamofire' from project 'Pods')
    cd /Users/milan/Wondra/Pods
    export DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer
    export SDKROOT\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk
 
Command CompileSwiftSources failed with a nonzero exit code

To resolve the “Command CompileSwiftSources failed with a nonzero exit code xcode 13” problem if the app is for iOS 11 or higher, one of the libraries needs to be changed to target iOS 11 or above. As a result, set the minimum for each pod to iOS 11 or higher. Launch xcworkspace Choose Pods. Next, click Build Settings iOS Deployment Target and change every pod to iOS 11 or higher at least.

Set the minimum for each pod to iOS 11 or higher.

When the app is for iOS 11 or later, one of the libraries has to be updated to support iOS 11 or later. As a result, set the minimum for each pod to iOS 11 or higher.

  1. Launch xcworkspace
  2. Choose Pods, then Build Settings iOS Deployment Target, then change each pod to iOS 11 or higher.

Conclusion

We hope you found our blog post on how to fix the error “Command CompileSwiftSources failed with a nonzero exit code xcode 13” helpful. If you have any further queries or concerns about this topic, please leave a comment. Thank you for reading; we are always glad when one of our articles provides useful knowledge on this subject!


Related articles
Scroll to Top