Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Compile Error

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?

like image 474
kriskendall99 Avatar asked Nov 11 '15 16:11

kriskendall99


People also ask

How do I fix Xcode errors?

Xcode tip #5: If you have a Swift file with many errors, you can use Xcode's fix-its to try to correct them one by one. But a faster way is to go to the Editor menu and choose Fix All Issues to apply fix-its all at once.

What causes a compile error?

A compile error happens when the compiler reports something wrong with your program, and does not produce a machine-language translation. You will get compile errors.

What is a compile error example?

Compiler errors are due to inaccuracies in code, where the compiler throws an error to alert you to something which will not compile, and therefore cannot be run. An example of a compiler error would be: int = "this is not an int"; Hope that helps.

How do I see errors in Xcode?

2) Go to: xCode preferences > General > "Issue Navigator Detail" > now boost the dropdown to 10 lines. Now you can see the whole message in the issue navigator! Save this answer. Show activity on this post.


1 Answers

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.

like image 138
Col Avatar answered Oct 20 '22 06:10

Col