cocoapods - linker command failed with exit code 1 - ios

I am getting the following error:
ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I uninstalled AFNetworking and did not get the error. I reinstalled and do get the error.
I am using AFNetworking 2.5.
I used cocoapods to install/uninstall.
Any ideas how to resolve this issue?

After 14 hours of debugging and the help of 8 different developers we found the problem! I hope this answer helps someone in the future. It was NOT an AFNetworking error at all. The problem was one view controller implementation file did not have the target selected in Target Memberships. AFNetworking was the first #import in that view controller and that is why it was being singled out in the error.
If you have this error and you have tried all the common solutions, go through your view controllers and check for this setting.

Related

iOS library not found for -lfsdk

I'm trying to get an older ~2014 era app running on my M1 Mac. I'm able to update cocoa pods and all that, but I keep getting the following error (with or without rosetta)
ld: library not found for -lfsdk
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I can't find any documentation about this one. Any clue what -lfsdk is?
Thank you!

objective-c linker error with OAuth2 library

I'm getting this error when I try to build my project in Xcode:
ld: library not found for -lGTMOAuth2 clang:
error: linker command
failed with exit code 1 (use -v to see invocation)
And we're using pods, so I opened the workspace, not the project.
I just got Xcode version 8.3.3, so not sure if this is causing any errors...
Turns out OAuth2 was not included in the Pod File, and I didn't check because I thought it was there before I pulled the latest version of the app. Thanks John Tracid.

clang: error: linker command failed with exit code 1 (use -v to see invocation) Bitcode Fix NOT Working

I'm trying to move an Xcode app from a MBP to an iMac. I've copied all the folders and files needed but keep getting to following error on build:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After Googling around a bit the most common fix for this is to set Bitcode to no. I've done this but it doesn't make a difference. I've also tried quitting Xcode emptying the DerivedData folder and restarting.
Below is the error in Full:
Here is a list of my linked libraries:
It sounds a lot like the error is true - have you definitely got your libWikitude framework in a referenced path?
Go to XCode, Build Settings, find 'Framework Search Paths' under Search Paths, and make sure the folder of your libWikitude is correct.
Perhaps it's hardcoded and now the path has changed?
After a few headaches with this I decided to simply remove all references to the Wikitude lib as it was not being used by the app.
This immediately solved the issue. Thanks for those who answered.

iOS AFNetworking iPods error

I want to implement AFNetworking in my application while implementation i got error like this how to resolve this error?
ld: library not found for -lPods-Transity-AFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I was able to solve the same problem with the following code.
Add this to the Library Search Paths in Build Settings and make sure you select recursive, delete other library paths which might be absolute paths.
$(PROJECT_DIR)
May be it will help you.

clang: error: linker command failed with exit code 1 (use -v to see invocation) when setting up cocoapods environment

I am setting the cocoapods dependency management tool for iOS project, when building my project i got this error:
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using Xcode 4.5 and Mac OS X Lion 10.7.4. Thanx in advance.
Can't comment yet, so posting as an answer.
It would help to have a bit more information on what you did to setup cocoapods, library settings in XCode and whether this is your first time using cocoapods or if the issue suddenly started. Try to give us a good idea of the details of your current situation.
For the time being, a little googling popped up this URL: https://github.com/CocoaPods/CocoaPods/issues/155
You might find it helpful, specifically the post near the bottom:
In my environment the issue was that the Pods project did not have a
target called ADHOC (as per the main project). I duplicated the Pods
release target, called it ADHOC, changed the OS Deployment Target to
my requirement (5.0) and then everything worked.

Resources