Apple Mach-O Linker Error occurs after adding AFNetworking - ios

When I add AFNetworking and build, Apple Mach-O Linker Error occur.
I saw Similar Questions but I couldn't any hints.
I added AFNetworking which is downloaded from GitHub to project.
The error message:
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have already added following frameworks.
・CFNetwork.framework
・Accelerate.framework
・SystemConfiguration.framework
・MobileCoreServices.framework
・Security.framework
・SenTestingKit.framework
How do I do to build?
By the way, I found description #import <CoreServices/CoreServices.h> in files of AFNetworking, but such framework is not found in Xcode.
Is this alright?

Related

How to resolve Framework not found JitsiMeetSDK.xcframework error

I want to integrate JitsiMeetSDK framework for iOS project. but it gives me error:
ld: framework not found JitsiMeetSDK.xcframework
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have set all the info as per link : https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-ios-sdk
I have used cocoapods, Xcode 12.4, Swift project. Any suggestions?

Getting framework(MLVision/MLVisionTextModel) not found issue when Integration firebase SDKs without using Cocoa pods

I am working on integration firebase ML vision kit without using the cocoa pods:
I am getting below error when adding SDK frameworks(MLVision and MLVisionTextModel) in app :
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Point 1:

My steps as I followed in app to integrate these SDK's framework :
A. Downloaded firebase SDK 5.20.2.
B. Followed the steps as defined inside the Readme.md file.
First, I added all framework from 'Analytics' directory into project navigator pane and do same thing for Firebase.h file.
Added the -ObjC flag to "Other Linker Settings
In AppDelegate.m , I add #import "Firebase.h" and [FIRApp configure];.

Project build successfully without any error.
C. Getting issue : For text recognition, I added MLVision and MLVisionTextModel in app as defined the step 5 in Readme.md for require framework and resource.
When I build this project I am getting below error in app:
I am getting below error as
Undefined symbols for architecture x86_64:
"std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from: l59875 in TextDetector
"typeinfo for std::__1::basic_iostream<char, std::__1::char_traits<char> >", referenced from: l59875 in TextDetector

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Point 2: Getting issue
Sometimes I was trying same thing adding SDK's framework by 'Link Binaries With Libraries' in Build Phases for Analytics, MLVision and MLVisionTextModel.
I was getting below error as
ld: framework not found FirebaseMLVisionTextModel
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Note: The framework FirebaseMLVisionTextModel doesn't have FirebaseMLVisionTextModel.h file. It doesn't exist header folder which is missing in FirebaseMLVisionTextModel framework:
I am getting same issue for TextDetector.framework which doesn't have any header folder.
Firebase.h : Deceleration file in Firebase.h which is missing in framework:
#if __has_include(<FirebaseMLVisionTextModel/FirebaseMLVisionTextModel.h>)
#import <FirebaseMLVisionTextModel/FirebaseMLVisionTextModel.h>
#endif
Xcode version: 10.1
Firebase SDK version: 5.20.2
Firebase Component: ML Kit (text recognition)
Component version:
Pls suggest how do I fix this problem.
How do I use FirebaseMLVisionTextModel and TextDetector framework that doesn't have any header , these frameworks have only exec file?
From https://github.com/firebase/firebase-ios-sdk/issues/2843:
The system C++ libraries are not being linked. That can happen with an incorrect Xcode module cache. Do rm -rf ~/Library/Developer/Xcode/DerivedData to reset. If that doesn't work, add libc++ to the Link Binary With Libraries Build Phase:

Apple Mach-O Linker Error - Xcode (Swift)

I'm trying to use a cocoapod with my Xcode project (Swift).
When I try to Build the project it fails with:
Apple Mach-O Linker Error Group
- "_OBJC_CLASS_$_FSCalendar", referenced from:
- clang: error: linker command failed with exit code 1 (use -v to see invocation)
Errors
Any ideas what could be causing this?
(The cocoapod I am using is: https://github.com/WenchaoD/FSCalendar
UPDATE
I have added the frameworks and now I am just getting "clang: error: linker command failed with exit code 1 (use -v to see invocation)"
UPDATE
Full error:
ld: warning: directory not found for option '-F/Users/me/Documents/APP/build/Debug-iphoneos/FSCalendar'
ld: warning: directory not found for option '-F/Users/me/Documents/APP/build/Debug-iphoneos'
ld: framework not found FSCalendar
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried everything suggested on the internet for the same issue and nothing resolved this. I fully re-installed Xcode and Cocoapods, set up the project exactly the same as before and it is now working.
After I ran pod install on the new name I changed my project to, I had this error cause the pod framework was not linking to NEW project name and was still looking for OLD name.
I resolved by going into my projects 'Linked Frameworks and Libraries' in the Targets section and removing the OLD framework that has the OLD project name.
Targets > General > Linked Frameworks and Libraries > -(Pods_OLD_PROJECT_NAME.framework)

Apple Mach-O Linker Error when using AVPlayers seekToTime:kCMTimeZero

I get this error when trying to restart a movie clip.
Apple Mach-O Linker Error
"_kCMTimeZero", referenced from:
Linker command failed with the exit code 1 (use -v to see invocation)
I have looked at the build phase and it has AVFoundation framework included.
Looked at other Apple Mach-O Linker Error, and which made me try doing a clean build, restarting XCode and the OS. But it didn't help.
You need the CoreMedia framework to use kCMTimeZero.

Apple Mach-0 Linker Error when building iOS app

I am making an iOS and I just installed CocoaPods with RESTKit. I also have JSON files. The Apple Mach-O Linker Error happens when I build and only started when I installed the CocoaPods with RESTKit.
Here is part of the error report.
ld: 586 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have a similar symptom occur when I have added a static library that included another library that I already had in the project. It may be that you already have a library included in your project that is also included int the CocoaPods with RESTKit.

Resources