Reputation: 2520
Using cocoa pods , install firebase:
target ‘Ejemplo’ do
pod 'MOCA'
pod 'Firebase/Auth'
end
Intall cocoa pods But when I try to compile
Ld /Users/dortiz/Library/Developer/Xcode/DerivedData/Ejemplo-hknorfqqubdrwxbrvosftrtmrnle/Build/Products/Debug-iphoneos/Ejemplo.app/Ejemplo normal armv7 cd /Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo export IPHONEOS_DEPLOYMENT_TARGET=10.2 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -L/Users/dortiz/Library/Developer/Xcode/DerivedData/Ejemplo-hknorfqqubdrwxbrvosftrtmrnle/Build/Products/Debug-iphoneos -L/Users/dortiz/Library/Developer/Xcode/DerivedData/Ejemplo-hknorfqqubdrwxbrvosftrtmrnle/Build/Products/Debug-iphoneos/GTMSessionFetcher -L/Users/dortiz/Library/Developer/Xcode/DerivedData/Ejemplo-hknorfqqubdrwxbrvosftrtmrnle/Build/Products/Debug-iphoneos/GoogleToolboxForMac -L/Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/MOCA -F/Users/dortiz/Library/Developer/Xcode/DerivedData/Ejemplo-hknorfqqubdrwxbrvosftrtmrnle/Build/Products/Debug-iphoneos -F/Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/FirebaseAnalytics/Frameworks/frameworks -F/Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/FirebaseAuth/Frameworks/frameworks -F/Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/FirebaseCore/Frameworks -F/Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/FirebaseInstanceID/Frameworks/frameworks -F/Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/GoogleInterchangeUtilities/Frameworks/frameworks -F/Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/GoogleSymbolUtilities/Frameworks/frameworks -filelist /Users/dortiz/Library/Developer/Xcode/DerivedData/Ejemplo-hknorfqqubdrwxbrvosftrtmrnle/Build/Intermediates/Ejemplo.build/Debug-iphoneos/Ejemplo.build/Objects-normal/armv7/Ejemplo.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=10.2 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/dortiz/Library/Developer/Xcode/DerivedData/Ejemplo-hknorfqqubdrwxbrvosftrtmrnle/Build/Intermediates/Ejemplo.build/Debug-iphoneos/Ejemplo.build/Objects-normal/armv7/Ejemplo_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -ObjC -all_load -lGTMSessionFetcher -lGoogleToolboxForMac -lMOCALib -lc++ -lsqlite3 -lz -framework AddressBook -framework AudioToolbox -framework CoreBluetooth -framework CoreLocation -framework CoreTelephony -framework FirebaseAnalytics -framework FirebaseAuth -framework FirebaseCore -framework FirebaseInstanceID -framework GoogleInterchangeUtilities -framework GoogleSymbolUtilities -framework MapKit -framework MobileCoreServices -framework PassKit -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -lsqlite3.0 -lPods-Ejemplo -Xlinker -dependency_info -Xlinker /Users/dortiz/Library/Developer/Xcode/DerivedData/Ejemplo-hknorfqqubdrwxbrvosftrtmrnle/Build/Intermediates/Ejemplo.build/Debug-iphoneos/Ejemplo.build/Objects-normal/armv7/Ejemplo_dependency_info.dat -o /Users/dortiz/Library/Developer/Xcode/DerivedData/Ejemplo-hknorfqqubdrwxbrvosftrtmrnle/Build/Products/Debug-iphoneos/Ejemplo.app/Ejemplo
duplicate symbol _GSDK_NSClassFromString in: /Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_56070eb5aec147705560f2b7c064869c.o) /Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o) duplicate symbol _GSDK_objc_getClass in: /Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_56070eb5aec147705560f2b7c064869c.o) /Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o) duplicate symbol _GSDK_objc_getProtocol in: /Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_56070eb5aec147705560f2b7c064869c.o) /Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o) duplicate symbol _GSDK_objc_lookUpClass in: /Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_56070eb5aec147705560f2b7c064869c.o) /Users/dortiz/Documents/BEACONS/Ejemplo/Ejemplo/Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o) ld: 4 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Al ready , I clean and reinstall de pods. To import firebase only , use @import Firebase;
Upvotes: 5
Views: 1582
Reputation: 514
you just need to remove the -all-load
flag from "other linker flag" in both project settings and target settings
Upvotes: 0
Reputation: 29572
This looks like a bug in the Firebase 3.11.1 build.
Try backing up to Firebase 3.11.0 by adding the following to your podfile:
pod 'Firebase/Analytics', '3.11.0'
Update: February 14, 2017: Firebase 3.13.0 released today should fix the duplicate symbol issue.
Upvotes: 3
Reputation: 1186
What helped me was going to Build Settings
for the Project file (blue) and in the Other Linker Flags
make sure you do not have -ObjC -all_load
manually set. Those are not required when using Objective-C modules and Cocoapods as Cocoapods will properly add the right flags to your target.
Upvotes: 5