Xcode compilation error

I repeatedly get this error with my code using Xcode.

<unknown>:0: error: merge-module command failed with exit code 1 (use -v to see invocation) Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 

I tried everything I could find, how to fix the problem, and nothing worked. I switched the optimization level to None [-Onone], I did a cleanup, and I ran the xcodebuild function in the terminal, but nothing worked. Any ideas on how to fix this?

+5
source share
2 answers

I had the same problem. I use Carthage and finally realized that for some reason I performed a carthage update with sudo, which changed the permissions of compiled frameworks. I fixed this by running the following commands.

brew upgrade carthage sudo rm -rf Carthage/ carthage update

Then clean the xcode project and rebuild.

Hope this helps.

+4
source

In my case, the actual error was described much further.

It was a header file that could not be found because I did not install Header Search Paths in my target Build Settings .

0
source

Source: https://habr.com/ru/post/1235717/


All Articles