I got an error when archiving a project. This is my environment.
- Mac OS Lion
- Xcode 4.3.1
- iOS SDK 5.1
The project deployment target is:
IPHONEOS_DEPLOYMENT_TARGET 3.2
The error shows:
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I guess Pods is CocoaPods that I used to manage XCode project dependencies. https://github.com/CocoaPods/CocoaPods
This is my Podfile
platform :ios
dependency 'libPusher', '1.1'
I am not sure what the error means?
Not a solution worked for me, this is really unbearable, there's a file
libpods.a
(which was red coloured) I removed it and everything working fine! Cheers to me ;)CocoaPods' wiki on GitHub has the answer right in their FAQ:
Product > Edit Scheme
Build
<Project Dir>/Pods/<Name of spec you are trying to include>
. If it is empty (it should not be), verify that the~/.cocoapods/master/<spec>/<spec>.podspec
has the correct github url in it.Preferences -> Locations -> Derived Data -> Advanced
and set build location to "Relative to Workspace".In this issue,If you have already installed & update pod in your system then your Xcode not being able to find the Pods library.To resolve this issue, please check for following causes that may take place:
try
link_with 'YouTarget1', 'YouTarget2' ...
My project worked, the targets suddenly stopped compiling. Then added "link_with" and returned to normal.
Apparently, now it just connects to the first target, is what the link says:
http://guides.cocoapods.org/syntax/podfile.html#link_with
Using ONLY_ACTIVE_ARCH=NO in all pods solved the problem for me. To make this persistent, I added a post_install hook to my Podfile:
pod install
and you're done.I was renaming the project to "NBSelector" from "Partners".
I had "Library not found for libPods-Partners" error after renaming the project. Xcode was trying to link to old Partners.a file. Just remove it if you have podInstalled after renaming.