Apple Mach -O Linker (Id) Error?

Viewed 46102

I am trying to build this xcode workspace which was built from Unity. And after modifying the project a little bit when I getting to the very end of building the project (linking) I get the Apple Mach -O Linker (Id) Error. I can't open the error tab to see what exactly is causing the error. All it says is "Linker command failed with exit code 1 (use -v to see invocation). There are also two Apple Mach -O Linker (Id) Errors which occur but I have no idea how to solve them.

Any help is greatly appreciated!

I can't expand these tabs.. this is all I get told This is the warning tab expanded, the two Apple Mach -O Linker (Id) warnings are the same

12 Answers

For me the scenario was that I removed one of the dependency in my pods which was not required, after removing it I was getting error that the same dependency not found. So I went to delete its entry from the Project >> Build Settings >> other Linker Flags and then selected the same and deleted it as shown below in the Image. After removing from the linker Flags I started getting the Apple Mach -O Linker (Id) Error? and after trying everything for a day I realised the issue lies inside the linker Flags. Where on deleting any dependecy you have to delete the other line name -framework. you can check the below image to get the clarity. Apple Mach -O Linker (Id) Error?

So I suggest to keep an eye on it while deleting the dependecy from the linker flags, do delete the associated -framework too which lies below the dependency name. In my case it was ObjectMapper

I was having the same issue, and resolved by

  1. installing the latest CocoaPods
  2. then do pod setup

For me I had the problem because I was using Xcode 9 (beta), then I open the same project with another Xcode 8.3. To solve the problem for me just Clean then Run again.

enter image description here

I used xcode 9.3 and I got this same error. But with 9.2 it works. The error may happen because of incompatibilities between the artifacts produced by the two xcodes. The project that threw the error included a framework built with xcode 9.2

I added libstdc++.tbd to "BuildPhases >> Link Binary With Libraries". It works for me.

How I resolved this issue:

  1. I exit Xcode then opened my project's .xcworkspace again.

  2. While Xcode was starting...i saw warnings...xcode is smarter enough and ask you switch to recommended settings...Tap it and let him do the changes. (Read warning seriously and with positive mind and then you will resolve it)

Related