I get these errors when I try to build an iOS application.
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to s
This problem-related to lPods can be fixed by following the steps below
"Build Phases"
in "Link Binary With Libraries"
.".a"
file of that library which is creating the problem. This will work.
My steps:
In addition to making sure "Build Active Architectures" was set to YES as mentioned in previous answers, this was what had done it for me.
I had the same problem
pod install and pod update on command line resolve my problem
Delete all the corresponding files/folders of imported cocoapods source except podfile.
install cocoapod
again.This should clear any redundant pull from the original source.
I got the same error.
The issue: I created a separate Workspace and added my existing project into it. I got the error when I worked on that Workspace.
The fix: Later I found that Workspace gets created automatically inside the existing project when dependencies are added. And have to work on that workspace.
None of the above answers fixed it for me.
What I had done instead was run pod install
with a pod
command outside of the target
section. So for example:
#WRONG
pod 'SOMEPOD'
target "My Target" do
pod 'OTHERPODS'
end
I quickly fixed it and returned the errant pod back into the target
section where it belonged and ran pod install
again:
# CORRECT
target "My Target" do
pod 'SOMEPOD'
pod 'OTHERPODS'
end
But what happened in the meantime was that the lib -libPods.a
got added to my linked libraries, which doesn't exist anymore and shouldn't since there is already the -libPods-My Target.a
in there.
So the solution was to go into my Target's General settings and go to Linked Frameworks and Libraries and just delete -libPods.a
from the list.