Command CompileSwift failed with a nonzero exit code in Xcode 10
Currently my build is working. Here you are the steps I tried until it finally worked:
- Search in the whole project the word CommonCrypto.
- If you have a Pod containing that header import, remove this Pod from the Podfile and perform a pod install.
- Clean and build the project.
- Add again the Pod to the Podfile and perform a pod install.
- Clean and build the project again using a real device if possible.
And If you don't have that Pod, maybe you can try by making the same steps with some old Pod that you may encounter in your project.
Added information: also If you have some code error inside a Pod, first you need to solve that code problem and then try to compile again the project.
I had this issue and changing the Compilation Mode setting for the project from Incremental to Whole Module fixed it for me.