I keep getting the following error
ld: framework not found FirebaseCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)
here is the pod file
platform :ios, '11.4'
target 'Myproject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
#use_frameworks!
use_modular_headers!
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'Firebase/Crash'
pod 'FirebaseStorageCache'
end
I have been struggling with this issue for days now. Request your help.
close xcode
pod reintegrate
pod install
open xcode
cmd+k
built
Related
I tried doing a clean build, uninstalling/reinstalling pods, not too sure where to go to next.
I never received this error before, but I first got it when I tried integrating Firebase into my project. I made sure to add all of the correct pods, I then went ahead and added a few other Firebase pods, just in case. I'm not sure if it has anything to do with this, but here is what my pods file looks like.
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Effortflex' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
use_modular_headers!
# Pods for Effortflex
pod 'RealmSwift'
pod 'IQKeyboardManagerSwift'
pod 'Firebase'
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod 'FirebaseFirestoreSwift'
end
Here is a sample of the error...
/Users/owner1/Library/Developer/Xcode/DerivedData/Effortflex-bmtqbbukvlosxpbraqoiwplpcfyj/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/nanopb.build/Objects-normal/x86_64/pb_encode.o
duplicate symbol '_pb_encode_fixed32' in:
/Users/owner1/Library/Developer/Xcode/DerivedData/Effortflex-bmtqbbukvlosxpbraqoiwplpcfyj/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/nanopb.build/Objects-normal/x86_64/pb_encode 2.o
/Users/owner1/Library/Developer/Xcode/DerivedData/Effortflex-bmtqbbukvlosxpbraqoiwplpcfyj/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/nanopb.build/Objects-normal/x86_64/pb_encode.o
ld: 34 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any help would be greatly apprecaited!
Something that helped me was to the following -
In terminal navigate to your project folder
Run 'pod deintegrate'
Run 'pod install'
After that my project was able to compile. Hope that works for you!
I am trying to update to latest frameworks in our app, but getting this error
Undefined symbols for architecture arm64:
"_FIRAuthStateDidChangeInternalNotificationAppKey", referenced from:
-[FAuthStateListenerWrapper authStateDidChangeNotification:] in FirebaseDatabase(FAuthTokenProvider_6272866f5c75e14e01c4ca08384ffa05.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
this is how my pod file looks
platform :ios, “9.0”
source 'https://github.com/CocoaPods/Specs.git'
target "foo" do
pod 'FBSDKShareKit'
pod 'AFNetworking'
pod 'Ono'
pod 'AFOnoResponseSerializer'
pod 'SVProgressHUD'
pod 'CTFeedback'
pod 'SIAlertView'
pod 'GPUImage'#, '~> 0.1.4'
pod 'UICKeyChainStore'
pod 'ASValueTrackingSlider'
pod 'Google-Mobile-Ads-SDK'#, '~> 7.47.0'
pod 'Google/Analytics'
pod 'SSZipArchive'
pod 'GoogleSignIn'
pod 'Fabric'
pod 'Crashlytics'
pod 'Firebase'#, '~> 4.8.2'
pod 'Firebase/Auth’
pod 'Firebase/Messaging'
pod 'Firebase/Invites'
pod 'Firebase/Storage'
end
I just ran pod update and the error started to show up.
added -ObjC,-licucore in other linker flags, alao disabled bitcode.
There's not enough information here to completely tell what is going on, but here are two red flags:
The missing symbol is from FirebaseDatabase, but FirebaseDatabase is not listed in the Podfile.
Firebase/Invites is in the Podfile, but Invites is no longer part of Firebase and will force Firebase 5 to be installed instead of the current Firebase 6.
You can learn more about why certain dependencies are chosen by examining the Podfile.lock.
My build failed with swift linker command failed with exit code 1. The logs specifically say symbol(s) not found for architecture x86_64
This happened ever since I tried setting up Google-Maps-iOS-Utils.
This is my Podfile. There is a pre_install portion because without it, pod install will have a 'Pods-Project' target has transitive dependencies that include static binaries error.
# platform :ios, '9.0'
target 'My App' do
use_frameworks!
platform :ios, '11.3'
# Pods for My App
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils' #the new pod that caused issues
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'GoogleSignIn'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'FirebaseUI/Storage'
pod 'Fabric', '~> 1.7.9'
pod 'Crashlytics', '~> 3.10.5'
target 'My AppTests' do
inherit! :search_paths
# Pods for testing
end
end
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
This is my Bridging-Header.h
#ifndef Bridging_Header_h
#define Bridging_Header_h
#import <Google-Maps-iOS-Utils/GMUMarkerClustering.h>
#endif /* Bridging_Header_h */
Some troubleshooting measures I tried:
Cleaning Build Folder and Building again;
de-integrating pods and pod installing again.
Any help is appreciated. Thanks.
This solution worked for me. There is no need for this portion in the Podfile as well.
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
I also had to delete the framework the binary search path in Build Phases.
Try to add library location in binary search path of build setting.
This is what I see when trying to run tests under test target in my iOS App:
ld: framework not found AFNetworking for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is how my podfile looks like:
use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "8.2"
def pods
pod 'AFNetworking'
pod 'Fabric'
pod 'Crashlytics'
pod 'MagicalRecord'
pod 'SDWebImage'
pod 'SVProgressHUD'
end
target 'MySoberRoomMate' do
pods
end
inhibit_all_warnings!
I am new on IOS development and did not have the required reputation to add comment so that I am posting answer.
I did a little work with pod file and i think the pods for the test target is not added in pod file so that the compiler showing the error.
do some thing like this in the pod file for the test target
target 'TestTarget' do
pods
end
add your test target name in place of 'TestTarget'
Hope it works.
XCode7
this is my Podfile
platform :ios, '7.0'
pod 'XMLDictionary'
pod 'Base64nl'
pod 'ASIHTTPRequest'
pod 'AFNetworking'
pod 'MWPhotoBrowser'
pod 'PinYin4Objc'
pod 'Pingpp'
New project pod after the install is an error
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What's the problem?
How to solve?
After installing CocoaPods , you must re-open your project using *****.xcworkspace file , NOT ****.xcodeproj file. Otherwise you would get this error.