Library not found for -lBVLinearGradient after upgrading my Xcode - ios

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

Related

Adding Pods to Xcode project brakes build

Forgive me, I am new to IOS Development. I have debugged this for a while now and tried all available solutions I could find. I added Pods to my Xcode project and the build now fails. I verified that after running "pod deintegrate; pod clean" the build works again. When I run "pod install" again and open the .workspace (not the .xcodeproj) - the build fails. I have tried every solution I could find.
I have already tried:
Deleting derived data (many times)
Restarting computer/xcode (many times)
verifying that I am opening the workspace, not the project
cleaning the project and re-building (many many times)
Deleting the Pod-.framework from the Frameworks folder and reading it to the Linked Frameworks and Libraries
Editing the build scheme to include Pod-.framework
Adding the pod frameworks to the Linked Frameworks and Libraries
Adding the pod frameworks to the Embedded Libraries
Editing the Framework Search Path in Build Settings
Building to an actual device and simulator
Heres my Podfile:
#platform :ios, '12.0'
target 'Burnt' do
use_frameworks!
pod 'MaterialComponents'
end
Versions:
MacOS version: 10.13.6
Xcode version: 10.1
Swift version: 4.2
CocoaPods version: 1.6.2
The Error:
ld: framework not found MaterialComponents
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Helpful Screenshots:
File Structure
General Settings
The Evil Error
please check MaterialComponents github version you are using right one or not
or try with
pod try MaterialComponents --> on github page
Try changing your swift version to 5 and compile and then you can change it back to 4.2 ..seems like some xcode linking glitch..
Can you compare your Project version(swift_version) and installed pod version are same?
i think this OS issue update your macOS and also update cocoapods.
Try new project to install pods.

Cocoapods linker error when running app from Xcode project

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.

How do I resolve the linker command error?

I installed the Stripe pod into my project, and it was working, but now it decided to stop working. I keep getting this error. What does it mean, and how do I fix it?
Library not found for -IAFNetworking Linker
Linker command failed with exit code 1 (use -v to see invocation)
You must use the new <YourProject>.xcworkspace instead of <YourProject>.xcodeproj.
The xcworkspace contains your project and your pods.
You also can follow this steps:
Uninstall the App from Device or Simulator.
Make sure close all Xcode Projects. (.xcworkspace and .xcproject) (sometimes .xcproject still open)
Run pod install and pod update
Open the .xcworkspace
Clean and Build your Project
After that you should be able to run normally.

Can not build Develop branch for Xcode 7 project on El Capitan due to "linker command failed with exit code 1 (use -v to see invocation)"

Xcode version: 7.0.1.
OS-X: Version 10.11 Release.
Project details: Built for iOS 7 or above, CocoaPods: AWSCore (Problematic one, other Pods build fine), other developers are on Xcode 7.0.1 as well but not on El Capitan.
When I try to build, I get "linker command failed with exit code 1 (use -v to see invocation)", along with a few warnings linked to the error.
Warning 1: "ld: warning: directory not found for option '-L/Users/sonny/{PROJECT_NAME}/build/Debug-iphoneos'"
Warning 2: "ld: warning: directory not found for option '-F/Users/sonny/{PROJECT_NAME}/Pods/HockeySDK/Vendor'"
Warning 3: "ld: library not found for -lAWSCore"
Solutions
I've tried: I've tried a complete pod remove master repo, pod setup, pod install. I've tried verifying that the architecture settings are the same for build on both my project target and pods target. I've tried deleting entries on Testing->Debug && Release in Build Settings along with putting $(inherited) in all the linker files and framework search entries.
Other issues that might be related: In the Project Navigator, all of my Frameworks Podfiles are red, indicating an incorrect folder reference. But wouldn't pod install correct this? I simply can't find the pods.a files anywhere in my project folder but I do not know if this is what's causing the build to fail.
Project builds for all other developers but not me or my supervisor. I'm on El Capitan but he isn't.
Solved:
This was my solution and keep in mind, the solution for everyone will be different -
In {Project Name} target, under your specific "General" if you scroll down you'll have a list of Frameworks. You want to delete ALL the Pod listings there "libPods-this or that.a". Those frameworks have been linked in a bash script and in other places during a Pod install, but Pod install didn't delete them from the project build listing.
Once you remove all those, it should build.

Xcode 7 build failed due to ld: library not found for -lGoogleAnalyticsServices

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.

Resources