Search code examples
iosxcodefirebasecocoapods

691 duplicate symbols for architecture x86_64


I know this seems like a common issue, but I've just tried everything I can find about this issue.

I'm trying to use AdMob and Firebase Analytics in my iOS app. I've installed them with CocoaPods. No matter what I try. I get the following error: 691 duplicate symbols for architecture x86_64

I've tried 'clean build', cleaning my Derived Data, pod deintegrate.

I have the following in my Podfile:

pod ‘Firebase/AnalyticsWithoutAdIdSupport’
pod 'Google-Mobile-Ads-SDK'

Here is my Podfile.lock

PODS:
  - Firebase/AnalyticsWithoutAdIdSupport (8.4.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics/WithoutAdIdSupport (~> 8.4.0)
  - Firebase/CoreOnly (8.4.0):
    - FirebaseCore (= 8.4.0)
  - FirebaseAnalytics/WithoutAdIdSupport (8.4.0):
    - FirebaseCore (~> 8.0)
    - FirebaseInstallations (~> 8.0)
    - GoogleAppMeasurement/WithoutAdIdSupport (= 8.4.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.4)
    - GoogleUtilities/MethodSwizzler (~> 7.4)
    - GoogleUtilities/Network (~> 7.4)
    - "GoogleUtilities/NSData+zlib (~> 7.4)"
    - nanopb (~> 2.30908.0)
  - FirebaseCore (8.4.0):
    - FirebaseCoreDiagnostics (~> 8.0)
    - GoogleUtilities/Environment (~> 7.4)
    - GoogleUtilities/Logger (~> 7.4)
  - FirebaseCoreDiagnostics (8.4.0):
    - GoogleDataTransport (~> 9.0)
    - GoogleUtilities/Environment (~> 7.4)
    - GoogleUtilities/Logger (~> 7.4)
    - nanopb (~> 2.30908.0)
  - FirebaseInstallations (8.4.0):
    - FirebaseCore (~> 8.0)
    - GoogleUtilities/Environment (~> 7.4)
    - GoogleUtilities/UserDefaults (~> 7.4)
    - PromisesObjC (< 3.0, >= 1.2)
  - Google-Mobile-Ads-SDK (8.8.0):
    - GoogleAppMeasurement (< 9.0, >= 7.0)
    - GoogleUserMessagingPlatform (>= 1.1)
  - GoogleAppMeasurement (8.4.0):
    - GoogleAppMeasurement/AdIdSupport (= 8.4.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.4)
    - GoogleUtilities/MethodSwizzler (~> 7.4)
    - GoogleUtilities/Network (~> 7.4)
    - "GoogleUtilities/NSData+zlib (~> 7.4)"
    - nanopb (~> 2.30908.0)
  - GoogleAppMeasurement/AdIdSupport (8.4.0):
    - GoogleUtilities/AppDelegateSwizzler (~> 7.4)
    - GoogleUtilities/MethodSwizzler (~> 7.4)
    - GoogleUtilities/Network (~> 7.4)
    - "GoogleUtilities/NSData+zlib (~> 7.4)"
    - nanopb (~> 2.30908.0)
  - GoogleAppMeasurement/WithoutAdIdSupport (8.4.0):
    - GoogleUtilities/AppDelegateSwizzler (~> 7.4)
    - GoogleUtilities/MethodSwizzler (~> 7.4)
    - GoogleUtilities/Network (~> 7.4)
    - "GoogleUtilities/NSData+zlib (~> 7.4)"
    - nanopb (~> 2.30908.0)
  - GoogleDataTransport (9.1.0):
    - GoogleUtilities/Environment (~> 7.2)
    - nanopb (~> 2.30908.0)
    - PromisesObjC (< 3.0, >= 1.2)
  - GoogleUserMessagingPlatform (2.0.0)
  - GoogleUtilities/AppDelegateSwizzler (7.5.0):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
  - GoogleUtilities/Environment (7.5.0):
    - PromisesObjC (< 3.0, >= 1.2)
  - GoogleUtilities/Logger (7.5.0):
    - GoogleUtilities/Environment
  - GoogleUtilities/MethodSwizzler (7.5.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/Network (7.5.0):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (7.5.0)"
  - GoogleUtilities/Reachability (7.5.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/UserDefaults (7.5.0):
    - GoogleUtilities/Logger
  - nanopb (2.30908.0):
    - nanopb/decode (= 2.30908.0)
    - nanopb/encode (= 2.30908.0)
  - nanopb/decode (2.30908.0)
  - nanopb/encode (2.30908.0)
  - PromisesObjC (2.0.0)

DEPENDENCIES:
  - Firebase/AnalyticsWithoutAdIdSupport
  - Google-Mobile-Ads-SDK

SPEC REPOS:
  trunk:
    - Firebase
    - FirebaseAnalytics
    - FirebaseCore
    - FirebaseCoreDiagnostics
    - FirebaseInstallations
    - Google-Mobile-Ads-SDK
    - GoogleAppMeasurement
    - GoogleDataTransport
    - GoogleUserMessagingPlatform
    - GoogleUtilities
    - nanopb
    - PromisesObjC

Any advice would be greatly greatly appreciated. I've tried everything and am going crazy.

UPDATE: Strangely, if I create a totally blank Xcode project in a blank directory, and add the same two pods, I get exactly the same issue.

UPDATE: If I use the standard 'pod ‘Firebase/Analytics', I don't get the issue. Perhapse just the pod ‘Firebase/AnalyticsWithoutAdIdSupport’ is broken?


Solution

  • Change the Podfile to:

    pod ‘Firebase/Analytics’
    pod 'Google-Mobile-Ads-SDK'
    

    Firebase/AnalyticsWithoutAdIdSupport and Google-Mobile-Ads-SDK is not a supported combination. Google-Mobile-Ads-SDK requires Ad Support.