Library not found with Cocoapods - ios

I'm trying to integrate Flurry into my App and I keep getting the following error:
ld: library not found for -lFlurry_5.1.0
I am installing with Cocoapods (0.33.1)

There is a linker flag -lFlurry_5.1.0 added by pods to the project and it does not resolve.
The solution is to link against this library in your targets build phases as shown below. You can do this by clicking the '+' button below 'Link With Binary Libraries'. The library is located at (PROJECT_DIR)/Pods/FlurrySDK/Flurry/Flurry_5.1.0.a
After adding this, you need to remove -lFlurry_5.1.0 flag from 'Other Linker Flags' under 'Build Settings' tab for your target.
Below are some screenshots for these steps.

Related

Linking Xcode iOS project with OCMock using cocoaPod

I installed OCMock using cocoapod for my test project
target 'ProjectTests' do
use_frameworks!
pod 'OCMock'
end
In My test project, Build Phases -> Link Binary with Libraries, I added OCMock.framework (Under Pods). But the actual file doesn't seem to exist there. Am I missing something?
In Build setting, updated Header/Library search path with '/Pods/OCMock/Source/**' (recursive).
My headers are getting referenced, but when I try to the tests I get an error
ld: framework not found OCMock
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone help me resolve the issue?

Xcode error: library not found for -lGoogleToolboxForMac

I am trying to install admobs in my iPhone App (written in objective-c). I have implemented this many times using swift projects, but currently I keep getting the following build error:
ld: warning: directory not found for option '-L/Users/charlieseligman/Library/Developer/Xcode/DerivedData/ThamesClippers-csissodainpbbjenykdyxuutzxtg/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
ld: warning: directory not found for option '-L/Users/charlieseligman/Documents/GIT/iOS.ThamesClippers/build/Debug-iphoneos/GoogleToolboxForMac'
ld: library not found for -lGoogleToolboxForMac
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am definitely opening the .xcworkspace file (and not the .xcodeproj file).
I have also tried deleting 'DerivedData' folder contents & 'Cleaning' the project and doing a 'Clean Build Folder'. None has resolved the issue.
My podfile only includes the following pods:
# Pods for ThamesClippers
pod 'Google/Analytics'
pod 'Firebase/Core'
pod 'Firebase/AdMob'
# Trying to fix GoogleToolboxForMac missing error
pod 'Firebase/Messaging'
pod 'GoogleToolboxForMac/Logger'
pod 'GoogleToolboxForMac', '~> 2.1'
I have tried adding the bottom 3 one-by-one but kept getting the same build error.
Can anyone help? At a complete loss on this one. Seen these two questions but their accepted solutions have not resolved this issue:
Framework not found GoogleToolboxForMac
ld: library not found for -lGoogleToolboxForMac
Finally worked out a fix:
Xcode > Product > Scheme > Manage Schemes
Select to 'Show' the scheme that was failing (GoogleToolboxForMac)
Select this scheme in the dropdown, just to the right of the 'Stop' button
Build this scheme
Then select the original scheme (in the dropdown mentioned in step 3) and rebuild
All built correctly.
So it looked like I had to build the separate scheme manually.
Note: To build these automatically, use Product > Scheme > 'Edit Scheme' > Build > And make sure all targets are added with your project target at the bottom.
I got this error in Xcode 10 when building to the Simulator. This is because I deleted the Debug base configuration in the xcodeproj when attempting to resolve the Cocoapods warning:
"CocoaPods did not set the base configuration of your project because your project already has a custom config set."
I resolved the issue by:
Adding the Debug base configuration
Setting the Debug configuration value to None
Running pod install
This is how the base configuration should look like after step 3:
]1

ld: framework not found FBSDKCoreKit clang

I am building an iOS messaging application with Layer+Parse. I have copied the files from the sample project into my exisiting application. At first I had over 40 errors upon building but I have worked it down to one. I have just added the Facebook SKD and I am left with this error:
ld: framework not found FBSDKCoreKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any help with getting this to go away would help greatly. I have already tried these steps:
Add the -ObjC flag to your project's Other Linker Flags build setting.
"Allow Non-modular Includes in Framework modules" setting to YES in Build settings
Set "Enable Modules" (c and Objective-C) to No
I had the same error and I fixed it by copying FBSDKCoreKit.framework into my project folder before adding it to the project.
The same issue solved by adding the Facebook SDK path in Framework Search Paths
in xCode
1- Select the project
2- Open Build phase tap
3- Search on Framework Search Paths
4- Add this path
$(SRCROOT)/../node_modules/react-native-facebook-login/FacebookSDK
If you've switched from adding frameworks manually to using cocoapods, make sure you've removed any reference to FBSDKCoreKit (or any other FBSDK kit) from any existing project which is not the Pods project (look at "Link Binary With Libraries" under "Build Phases").
Try searching for it in Build Settings. I removed Facebook from Cocoapods and it was still in other linker flags causing problems.

Quickblox simple chat app

ld: warning: directory not found for option '-F/Users/igorkhomenko/workspace/quickblox-ios-sdk/Framework'
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am new to ios development and quickblox
I get this kind of error..what it is about ? M i missing to add some file .
you seem to have used cocoapods to add this library to your project.
Cocoapods creates, and requires you to use, an xcworkspace file to manage your Xcode project.
This is an error that occurs when you are still using the xcodeproj file instead of the xcworkspace.
Either that or your cocoa pods setup is broken. Try running pod install again or see the website to fix it.
Did you add the quicklblox library through Target Settings -> Build Phases -> Link binary with libraries -> + button?

Cocoa Pods Error ld: library not found for -lPods

I'm getting a error from cocoa pods that I've never seen before. I've had it working with several dependencies just fine. I recently added the TestFlightSDK as a dependency through pods and I'm unable to Archive the project. It builds just fine to devices but refuses to Archive. Has anyone else experienced this issue?
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My Library Search Paths looks like this (for both debug and release):
$(SRCROOT) recursive
$(PODS_ROOT) recursive
$(inherited) recursive
Ok so I found the answer (that worked for me) using some suggestions from this post
I was actually getting a different Warning that I hadn't noticed.
Pods was rejected as an implicit dependency for 'libPods.a' because its
architectures 'armv7 armv7s' didn't contain all required architectures
'armv7 armv7s arm64'
It was actually related to the Pods target not having the correct architectures. It turned out to be a xCode bug after all. In my Pods Target I had all the correct acrhitectures selected, armv7, armv7s, and arm64.
THE SOLUTION:
Update cocoapods to the newest version that supports 64 arch.
sudo gem update cocoapods
Delete all Valid Architectures and do a project clean (which fails alot..)
Re-Add the architectures that you just removed and voilĂ !
my fault was an old cocoa pods integration. had to delete the pod-.a files in "/Frameworks" folder and pod-.xcconfig in "/Pods".
-> run 'pod install'
everything fine
Other solution is if you update your pods with new target, you will check libpods.a, maybe was deleted and system not found it. Make sure that libpods is in your Linked Framework and libraries in General information (where you change version, bundle identifier and build).
In my case problem was with Scheme.
go to Product -> Scheme -> Edit Scheme
click on Build
add the Pods static library, and make sure it's at the top of the list
clean and build again
You can fix this issue if this belongs to libraries by selecting your Target, then going to "Build Phases" in "Link Binary With Libraries", and removing ".a" file of that library. After this Clean and Build.
Hope this helps.

Resources