Reputation: 547
I'm repeatedly getting 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've tried everything I could find on how to fix the issue and nothing has worked. I've switched my optimization level to None[-Onone], I've performed cleans and I've run the xcodebuild function in Terminal, but nothing has worked. Any ideas on how to fix this issue?
Upvotes: 6
Views: 2488
Reputation: 1530
In my case the actual error was described a lot further down.
It was a header file that couldn't be found because I hadn't set the Header Search Paths
in my target Build Settings
.
Upvotes: 0
Reputation: 2350
I just had the same issue. I'm using Carthage and finally figured out that, for some reason, I had run carthage update
with sudo which changed the permissions of the 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 re-build.
Hope that helps.
Upvotes: 4