I need help to solve my duplicate symbols errors. It started after installing Firebase Analytics with CocoaPods.
The duplicate symbols were all (34) in: /Library/Developer/Xcode/DerivedData/appName/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nanopb.build/Objects-normal/arm64/
pb_common 2.o; pb_common.o; pb_encode 2.o; pb_encode.o; pb_decode 2.o and pb_decode.o
After updating to Xcode 11.2 and installing Firebase 6.10.0 (was 6.11.0) 5 other duplicate symbol errors appeared in GoogleUtilities:
duplicate symbol '_OBJC_CLASS_$_GULAppEnvironmentUtil' in:
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULAppEnvironmentUtil 3.o
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULAppEnvironmentUtil.o
duplicate symbol '_OBJC_METACLASS_$_GULAppEnvironmentUtil' in:
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULAppEnvironmentUtil 3.o
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULAppEnvironmentUtil.o
duplicate symbol '_GULNSDataZlibRemainingBytesKey' in:
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib 2.o
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib.o
duplicate symbol '_GULNSDataZlibErrorKey' in:
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib 2.o
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib.o
duplicate symbol '_GULNSDataZlibErrorDomain' in:
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib 2.o
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib.o
ld: 5 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation).
I have seen other duplicate symbols questions on SO and tried out some suggestions, but I don't dare experimenting too much. Deleting Derived data does not help. I also tried removing -Objc linker flag from Other Linker flags under Build Settings, as suggested here on SO. Didn't help either.
I'm now back with Firebase 6.11.0. Here are my Firebase pods:
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
pod 'Firebase/AdMob'
Please tell me if I need to post more details. I really have no idea how to deal with this!
Ok, so I came across a solution.
pod deintegrate
pod install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With