12.06.33.0Performance6.33.0CocoaPodsWhen Firebase/Performance is used with GoogleTagManager, Xcode 12 generates warnings about conflicting methods in different categories:
ld: warning: method '-logMessage:level:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMLogger.o) conflicts with same method from another category
ld: warning: method '+fileHandleForLoggingAtPath:mode:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMLogger.o) conflicts with same method from another category
ld: warning: method '-logMessage:level:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMLogger.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByGzippingBytes:length:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByGzippingData:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByGzippingBytes:length:compressionLevel:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByGzippingData:compressionLevel:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByDeflatingBytes:length:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByDeflatingData:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByDeflatingBytes:length:compressionLevel:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByDeflatingData:compressionLevel:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByInflatingBytes:length:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByInflatingData:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByRawDeflatingBytes:length:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByRawDeflatingData:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByRawDeflatingBytes:length:compressionLevel:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByRawDeflatingData:compressionLevel:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByRawInflatingBytes:length:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
ld: warning: method '+gtm_dataByRawInflatingData:' in category from /Users/user/develop/_bugreport/google_utils_conflict/Pods/GoogleUtilitiesLegacy/Frameworks/frameworks/GoogleUtilitiesLegacy.framework/GoogleUtilitiesLegacy(GTMNSData+zlib.o) conflicts with same method from another category
Add to Podfile:
pod 'GoogleTagManager'
pod 'Firebase/Performance'
Example project:
https://github.com/voidless/google_utils_conflict
I found a few problems with this issue:
@voidless Thanks for the report and great minimized reproduction example.
I'm able to reproduce. I believe this category symbol conflict has been there as long as FirebasePerformance has existed but is only now being exposed by Xcode 12.
GoogleUtilitiesLegacy is a binary version of GoogleToolboxForMac with renamed symbols to avoid conflicts with the current version. However, the categories still conflict.
We should do two things - either of which would eliminate this warning:
We are having the same warnings in our project due to including both Firebase/Performance and GoogleTagManager via CP. We have tried a number of solutions but couldn't get the warnings to go away, so this is a big annoying as constantly having 19 warnings makes noticing new warnings harder.
Do you have any updates to this issue? Maybe an idea how to silence the warnings or an estimate on if / when those might be fixed? (I do understand not many apps use this combination of pods and that they are only warnings, so their priority is probably not very high :) )
On further research, this issue is exposed by using use_frameworks! :linkage => :static in the Podfile.
GoogleToolboxForMac/Logger dependency which needs more investigation.@paulb777 I really appreciate you looking into this issue. Sorry I missed explicitly stating that my usecase includes the static linkage (which is an important detail).
The rest of the dependencies on GTM is cleaned up from Firebase Performance in the PR https://github.com/firebase/firebase-ios-sdk/pull/7230
Hi @paulb777 / @visumickey,
Thanks a ton for putting work into this!
I face the same issue with having those warnings when combining Firebase/Performance and GoogleTagManager dependencies.
Reading this thread my assumption was, that the issue is resolved with #7147 & #7230 merged into master, however even
if I explicitly force CocoaPods to use Firebase/Performance from the master branch, I still see the warnings in Xcode.
I use the latest Xcode 12.3 (12C33) & can reproduce the issue with the following, minimal Podfile:
source 'https://github.com/CocoaPods/Specs.git'
target 'FirebasePerfTest' do
pod 'Firebase/Performance', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
pod 'GoogleTagManager'
end
Any hints on how to resolve the issue?
Thanks a lot!
@tonistair Likely the issue is that the Podfile is asking for the Firebase pod from the master branch but the FirebasePerformance pod:
pod 'FirebasePerformance', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
@paulb777 Thanks for that blazing fast reply!
I tried to use pod 'FirebasePerformance' instead of pod 'Firebase/Performance' as you suggested above so my Podfile now looks the following:
source 'https://github.com/CocoaPods/Specs.git'
target 'FirebasePerfTest' do
pod 'FirebasePerformance', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
pod 'GoogleTagManager'
end
However, when I run pod install --repo-update it throws me the following:
Analyzing dependencies
Pre-downloading: `FirebasePerformance` from `https://github.com/firebase/firebase-ios-sdk.git`, branch `master`
[!] CocoaPods could not find compatible versions for pod "GoogleDataTransport":
In Podfile:
FirebasePerformance (from `https://github.com/firebase/firebase-ios-sdk.git`, branch `master`) was resolved to 7.3.0, which depends on
GoogleDataTransport (~> 8.2)
None of your spec sources contain a spec satisfying the dependency: `GoogleDataTransport (~> 8.2)`.
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
@tonistair Looks like you also need to explicitly ask for GoogleDataTransport from the master branch as well.
@paulb777 Thanks again for taking the time!
I changed my Podfile to the following:
source 'https://github.com/CocoaPods/Specs.git'
target 'FirebasePerfTest' do
pod 'GoogleDataTransport', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
pod 'FirebasePerformance', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
pod 'GoogleTagManager'
end
This seems to resolve the issue with GoogleDataTransport, however it opens up another issue:
[!] CocoaPods could not find compatible versions for pod "nanopb":
In Podfile:
Firebase/Core (from `https://github.com/firebase/firebase-ios-sdk.git`, branch `master`) was resolved to 7.3.0, which depends on
FirebaseAnalytics (= 7.3.0) was resolved to 7.3.0, which depends on
nanopb (~> 2.30906.0)
GoogleDataTransport (from `https://github.com/firebase/firebase-ios-sdk.git`, branch `master`) was resolved to 8.2.0, which depends on
nanopb (~> 2.30907.0)
It seems like there is a conflict since FirebaseAnalytics wants to use nanopb (~> 2.30906.0) and 'GoogleDataTransport' wants to use nanopb (~> 2.30907.0)...
Any idea?
@paulb777 To give an update it seems like the main issue was resolved in the meantime with the release of 7.4.0!
I only needed to additionally specify the platform in the Podfile as otherwise there would be 3 warnings from GoogleUtilitiesLegacy, GoogleSymbolUtilities and GoogleAnalytics.
So my fully working Podfile for my testing project looks like this now:
(I used iOS 10 as platform since this is the deployment target of the prod app we need to integrate FirebasePerformance into)
platform :ios, '10.0'
source 'https://github.com/CocoaPods/Specs.git'
target 'FirebasePerfTest' do
pod 'GoogleDataTransport', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
pod 'FirebasePerformance', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
pod 'GoogleTagManager'
end
@tonistair Good to hear! Also, I recommend removing the git specifiers from the Podfile and going with the standard 7.4.0 release instead. The master branch may not remain stable.
Most helpful comment
@tonistair Good to hear! Also, I recommend removing the git specifiers from the Podfile and going with the standard 7.4.0 release instead. The master branch may not remain stable.