After running pod install with:
pod 'Firebase/Analytics'
I am now getting the following build error:
ld: framework not found FirAnalyticsConnector clang error: linker
command failed with exit code 1 (use -v to see invocation)
I have tried removing FirAnalyticsConnector from the Build Setting's Other Linker Flags (as similar questions' answers suggested), but it does not solve the issue
Any ideas as to why I am getting this build error when I was previously able to build the project?
I managed to fix this by removing the Firebase pod completely, then reinstalling.
I first removed it from my podfile, did another pod install, then deleted all references in my code (and Other Linker Flags). I also had some old (previously Twitter, then Google) Fabric code.
Once I got the project to build and run without that cocoapod, I tried installing it fresh following Firebase documentation and it works with no errors now.
Related
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").
I followed the firebase offical guide to set up my podfile.
However I now get this error when I try to run my app:
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You need to open the .xcworkspace file after running pod install or pod update, not the .xcproject.
It should have been generated by the pod command, and will contain both your regular project and the CocoaPods project with the dependencies in.
I have a pretty classical error during my project building:
ld: library not found for -lAppLovinSdk
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Originally I got the library from Cocoapods pod, but then I started having a lot of errors and decided to remove the pod from the Podfile and executed pod update
My Podfile looks like this:
I've tried to clean project, reinstall the Podfile, deleting Pods folder and Podfile.lock file, "Build Active Architecture Only" is set to "No", but I still have the error. I assume I still have some references to libraries from the deleted Pod. What is the way to get rid of them?
UPDATE: Here is a full error message:
Ok, so I figured out the problem:
I had to go to Target -> Build Settings -> Linking -> Other Linking Flags and there I had to remove all deleted libraries references, manually. And then it worked!
I have been struggling to get my xcode project to build for the last couple hours. I keep getting the following error:
ld: library not found for -lGoogleAnalyticsServices
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried almost everything. I saw that the Google Developers website said to use pod 'Google/Analytics', even after trying almost everything I could find on StackOverflow and Google regarding the error, I have had absolutely no luck.
I upgraded to XCode 7 yesterday, everything seemed to work yesterday but today suddenly I started getting this error.
If someone has anything I can do about this error, please help!
Pointing me in the right direction to get it fixed would be awesome too!
Thanks in advance for your help.
The linker flag has been renamed to:
-lGoogleAnalytics
but the Cocoapods settings have not been updated yet. Rename the entry in "Other Linker Flags" and your problem will be solved.
Also, the library (as of the moment I write is version 3.13.0) does not support Bitcode yet, thus please turn off Bitcode in Build Options > Enable Bitcode > Select "No". Clean & Rebuild afterwards.
Same problem occurred in my project. What I did, I just updated all my pods and after that my app got compiled.
Run "pod update" command from terminal in your project directory where the pod file is located.
Please make sure you opened .xcworkspace not .xcodeproj.
Go to Library Search Paths in Build settings and
add
$(PROJECT_DIR)/Pods/build/Debug-iphoneos
$(inherited)
pod install again.
Update cocoapods to the newest version that supports 64 arch.
sudo gem update cocoapods
Delete all Valid Architectures and Re-Add the architectures that you just removed.
Clean and run
Without looking directly at your build settings, there's a number of things that could be causing this. The main issue is in your linker flags you likely have something lingering/incorrect. Most of your pods have the prefix of:
-lPods-WhichIt-SomePodsLib
However your GoogleAnalyticsLibrary has the prefix:
-lGoogleAnalyticsServices
This might indicate a lingering flag from your. Try looking for this entry in Other Linker Flags (Under Build Settings) and clear this out and re-running pod install.
Other things to check:
Cocoapods version is latest stable version
You are using the latest version of Google's official Analytics pod
Your library/framework search paths (build settings) are correctly pointing to the analytics library in question.
For the record, I've had issues with pods and using google libs before they officially started releasing in cocoapods. If all else fails, remove the pod entry from your Podfile and try adding the library manually.
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.