After updating my POD install, Xcode sprouted a new issue:
16 Answers
There are several cases that cause this issue. At the moment, this question has no any accepted answer and also I found another solution for the same issue, I am posting my answer/experience here.
In you application, go to Target -> Build Settings, then you will find following attributes.
- CLANG_WARN_INFINITE_RECURSION
- CLANG_WARN_SUSPICIOUS_MOVE
- GCC_NO_COMMON_BLOCKS
Set values for those as NO, then clean and build the project.
Remove the local files of WikitudeSDK from target. Xcode is getting confused between the paths of library, which one to chose- pod or local.
Also try reinstalling podfile and remove wikitude from pod file to. IN linker search path settings, in build settings, check the paths mentioned to find the required library.
Lastly install gems before updating pods
I have no clue why the error occurred in my case, I was reusing some code from another project I created a while ago and after I adapted the code, then I always got the "Apple Mach -O Linker command failed"- Message. My best guess is, that it happened because I created/deleted some files from the project.
The thing that solved it for me was this:
- Create a new Project
- copy all the necessary files from the old project to the new one (Drag and Drop, don't forget the "Copy if needed" Checkbox)
- Build and see that it works
Sounds stupid and I have no idea why, but it worked.
I am using XCode for compiling ionic 3 app.
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.10.1
ionic (Ionic CLI) : 3.10.1
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3 ios 4.5.0
Ionic Framework : ionic-angular 3.6.0
System:
ios-sim : 5.0.8
Node : v8.4.0
npm : 5.4.0
OS : OS X Yosemite
Xcode : Xcode 7.2 Build version 7C68
There was not write permission in most of the file of ios, which was main issue.
I just changed the permission of ios file and got issue resolved by using command.
sudo chmod -R 775 platforms/ios/
Worked great.
I experienced the error when overwriting project.
Still encountered the error after:
Changing the clang settings
ionic cordova platform remove ios rather than just delete ios platform folder before each new build (and of course add the platform again)
updating ruby as per instructions: https://forum.ionicframework.com/t/x-code-8-beta-2-apple-mach-o-linker-id-error/71998
Error was solved after changing to a different branch in github but perhaps one of the other troubleshooting methods played a part. Now all branches run on xcode without the Mach -O Linker Error.
First thing you have to do is to delete the files in
/Users/Yourname/Library/Developer/Xcode/DerivedData/YourAppName-xxxx
and then restart your Xcode. That is no joke!
If you got an error like "duplicate symbol_OBJC_CLASS_$_Pod in:", you should go to TARGETS->Build Phases->Compile Sources and delete extra file.

