I already using GoogleOpenSource.framework in my app for Google+ integration. Now I want to add Firebase Analytics with Google Tag Manager. In order to do that, It needs to include GoogleToolboxForMac.framework. Now my contains both GoogleToolboxForMac and GoogleOpenSource frameworks. Issue is both frameworks has GTMLogger class, so the project cannot compile. It gives
duplicate symbol _OBJC_METACLASS_$_GTMLogAllowedLevelFilter
I try to remove the GTMLogger class from one of the framework, but It cannot be done. What should be I do to overcome this issue?
this answer those who use manual integration for adding the Firebase,
I also faced the same issue, both google+ and Firebase analytics has same file GTMLogger we can't remove it from the framework, instead, we need to review the Google plus integration see thisStep 2.(in point 4) Initialize the Google+ Client in they have mentioned If your project already includes some of the open source files, you can instead include the remaining files from the OpenSource folder. this did the trick.
since GTMLogger is present in the GoogleToolboxForMac.framework we don't need to add this, so remove the framework of Google plus's GoogleOpenSource.framework and add the files in open source and do not include the file GTMLogger.m and GTMLogger.h of newly downloaded google+ frameworks folder, and remove all imports of this frame work, this might give some error like in the line
[GPPSignIn sharedInstance].scopes = @[kGTLAuthScopePlusLogin]; //error
simply command click on kGTLAuthScopePlusLogin and import the .h file that is #import "GTLPlusConstants.h".
Hope this helps
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