GoogleUtilitiesLegacy conflicting methods in categories

Step 1: Describe your environment

  • Xcode version: 12.0
  • Firebase SDK version: 6.33.0
  • Firebase Component: Performance
  • Component version: 6.33.0
  • Installation method: CocoaPods

Step 2: Describe the problem

When 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

Steps to reproduce:

Add to Podfile:

    pod 'GoogleTagManager'
    pod 'Firebase/Performance'

Example project:
https://github.com/voidless/google_utils_conflict

3 thoughts on “GoogleUtilitiesLegacy conflicting methods in categories

  1. On further research, this issue is exposed by using use_frameworks! :linkage => :static in the Podfile.

    #7147 addresses most of the warnings, but two remain as a result of the GoogleToolboxForMac/Logger dependency which needs more investigation.

  2. @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.