I want to add Firebase Cloud Messaging to my project which has already other services from Google (like Analytics). I am using cocoapods and I added to my podfile:
pod 'Firebase'
pod 'Firebase/Messaging'
I run pod install
and everything looked good but when I am trying to build project I get many duplicate symbol errors:
duplicate symbol _OBJC_CLASS_$_ACPGmpAudienceRoot in:
.../Pods/Google/Libraries/libGGLCore.a(GmpAudience.pb.o)
.../Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics(GmpAudience.pb_d68254ec585824fa42de6de2f056cda0.o)
... more and more duplicate symbol errors ...
How can I fix it? Why with Messaging there is added Analytics library too? I don't need it. I tried Clean project and delete Derived data but for now without luck.
Update your Google/(Google analytics) pod version to 3.0 higher .
I was using version 2.0.4, I did pod update
and the following pods were update:
After that I was able to use Google analytics with Firebase
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