Cocoapods linker error when running app from Xcode project - ios

I tried installing some Cocoapods based on some instructions online and the whole process went as described. But I now get an error:
ld: framework not found Pods_Happ
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried installing a pod called "WCLShineButton". I think it has something to do with my app's framework because the "Pods_Happ.framework" is red:
Pods_Happ.framework red

Close the .xcodeproj file and open the .xcworkspace file in Xcode instead.
CocoaPods wraps your Xcode project (.xcodeproj) into an Xcode workspace. After that you should always work with the workspace instead of the project.

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?

Library not found for -lBVLinearGradient after upgrading my Xcode

I'm trying to build my react-native project after upgrading my Xcode but I'm getting an error:
"ld: library not found for -lBVLinearGradient
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
Error screenshot in Xcode
I'm pretty sure this error is related to Cocoapods / Xcode because the app was building before the xcode upgrade.
What I have done so far:
Use the .xcworkspace file
Pod deintegrate / pod install (several times)
Uninstall and reinstall the Linear-Gradient npm
Setting the same iOS version in Deployment Target / info.plist
Remove the '.a' files from Build Phases / Link Binary With Libraries
Do you guys have any other suggestion? I'm literally stuck at this bug for 3 days. And the worst part is that I have made everything I could find on internet.
Thanks

How to fix swift linker error "framework not found GTMSessionFetcher clang"

This error suddenly showed up in my Swift program
ld: framework not found GTMSessionFetcher
clang: error: linker command failed with exit code 1 (use -v to see invocation)
but I have it as one of the frameworks
and this is the pod file
I have remove cocoapods and reinstalled it and no result
I have clean and open the workspace instead of the project and still no changes.
I have tried all approaches from similar questions and still no luck.
some of the answers I've looked at are
Apple Mach-O Linker Warning "Directory Not Found For Option..."
Linker command failed with exit code 1 after installing CocoaPods and firebase pod
https://www.bountysource.com/issues/39247126-clang-error-linker-command-failed-with-exit-code-1-use-vto-see-invocation
I noticed my error is somewhat unique to what I have been seeing from others in that it's a GTMSessionFetcher error.
How can I fix this and get rid of the error?
First, try running pod install.
It looks like GTMSessionFetcher.framework is grayed out, which means that the file was deleted. If pod install doesn't work, try removing each grayed-out framework file from the list and dragging it back in (either from the project folder or from the sidebar under "Products").

Getting error when building in .xcodeproj - clang: error: linker command failed with exit code 1

I installed the braintree pod a long time ago in my .workspace project and tried to build my app in the .xcodeproj but am getting this error
ld: library not found for -lPayPalMobile
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Afterwards, the .workspace failed for the same reason. I have never had any problems building the app in the .workspace before this. I searched around for the solution, but nothing has worked so far.
I am not actually using braintree in my project and don't mind removing the framework altogether.
edit I tried updating the pod and got this message
[Debug]target overrides theFRAMEWORK_SEARCH_PATHSbuild setting
defined inPods/Target Support Files/Pods/Pods.debug.xcconfig'. This
can lead to problems with the CocoaPods installation
- Use the $(inherited) flag, or
- Remove the build settings from the target.
edit 2 I deleted the braintree pod and its working fine in the .workspace file, but now the .xcodeproj has this error
ld: library not found for -lPods-AFNetworking clang: error: linker
command failed with exit code 1 (use -v to see invocation)
I searched the project and couldn't find there AFNetworking was (but in my command line it says that pod AFNetworking is being used)
A few things. One - Make sure you're only using one .xcworkspace at a time. Also, did you open .xcworkspace or .xcodeproj? Are you trying to build custom configurations? The only other thing I can think of is your schema containing spaces.

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?

Resources