firebase-ios-sdk: GTMSessionFetcher.h -Multiple Errors after Updating Pod and/or Installing Pod from Scratch

Description

When I update my pods, I constantly get multiple GTMSessionFetcher.h errors.

Duplicate interface definition for class 'GTMSessionFetcherUserDefaultsFactory'

Redefinition of 'GTMSessionFetcherError'

Redefinition of 'GTMSessionFetcherStatus'

Duplicate protocol definition of 'GTMFetcherDecoratorProtocol' is ignored

Duplicate protocol definition of 'GTMSessionFetcherServiceProtocol' is ignored

Cannot find protocol declaration for 'GTMFetcherDecoratorProtocol'; did you mean 'GTMFetcherAuthorizationProtocol'? ; Reference to 'GTMFetcherDecoratorProtocol' is ambiguous

'GTMFetcherAuthorizationProtocol' is deprecated: implement GTMSessionFetcherAuthorizer instead

Duplicate protocol definition of 'GTMFetcherAuthorizationProtocol' is ignored

No type or protocol named 'GTMSessionFetcherServiceProtocol' ; Reference to 'GTMSessionFetcherServiceProtocol' is ambiguous

I then deleted the pod file, and reinstalled from scratch:

$ rm -rf ~/Library/Developer/Xcode/DerivedData
$ pod deintegrate
$ pod clean
$ rm Podfile
$ pod cache clean --all
$ pod init
// reinstalled the same pods

And the same errors keep appearing. I also cleaned the project.

One very odd thing that I noticed is my Firebase pod only installs versions 9.6.0 when Firebase is currently on version 10.4.0. It installs 9.6.0 for both updating the pod and freshly installing the pod, but it should be installing pod version 10+.

I have no idea what the problem is because prior to me updating or reinstalling the pods everything worked fine.

Podfile:

# Uncomment the next line to define a global platform for your project
platform :ios, ’10.0’

install! 'cocoapods', :deterministic_uuids => false

target 'MyAppName' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for MyAppName

#pod 'Firebase' // tried with and without this, same problems
pod 'Firebase/Functions'
pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Messaging'
pod 'FirebaseAnalytics'
pod 'FirebaseCrashlytics'
pod 'Firebase/Installations'
pod 'Firebase/Database'

pod 'Google-Mobile-Ads-SDK'
pod 'PersonalizedAdConsent'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'GoogleSignIn'
pod 'GoogleAnalytics'

pod 'AFNetworking'
pod 'SwiftyJSON'
pod 'SDWebImage'
pod 'KeychainSwift'
pod 'IQKeyboardManagerSwift'
pod 'SVProgressHUD'
pod 'SwiftyStoreKit'
pod "SwiftPhoneNumberFormatter"
pod 'ObjectMapper'
pod 'InstantSearchClient', '~> 7.0'
pod 'ReachabilitySwift'

post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
        target.build_configurations.each do |config|
            config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
        end
      end
    end
end

end

Error Pics:

Screen Shot 2023-01-21 at 9 33 50 AM Screen Shot 2023-01-21 at 9 34 20 AM Screen Shot 2023-01-21 at 9 34 31 AM Screen Shot 2023-01-21 at 9 34 58 AM Screen Shot 2023-01-21 at 9 35 10 AM

Reproducing the issue

In my Description I included the pod file that I’m currently running. All I did was add all of the same exact pods in the pod file and then once I built the project all the errors appeared.

Firebase SDK Version

9.6.0

Xcode Version

14.1 (14B47b)

Installation Method

CocoaPods

Firebase Product(s)

Analytics, Authentication, Crashlytics, Database, Functions, Installations, Messaging, Storage

Targeted Platforms

iOS

Relevant Log Output

These aren't log outputs because the app won't build. These are compile and warning errors:

Duplicate interface definition for class 'GTMSessionFetcherUserDefaultsFactory'

Redefinition of 'GTMSessionFetcherError'

Redefinition of 'GTMSessionFetcherStatus'

Duplicate protocol definition of 'GTMFetcherDecoratorProtocol' is ignored

Duplicate protocol definition of 'GTMSessionFetcherServiceProtocol' is ignored

Cannot find protocol declaration for 'GTMFetcherDecoratorProtocol'; did you mean 'GTMFetcherAuthorizationProtocol'? ; Reference to 'GTMFetcherDecoratorProtocol' is ambiguous

'GTMFetcherAuthorizationProtocol' is deprecated: implement GTMSessionFetcherAuthorizer instead

Duplicate protocol definition of 'GTMFetcherAuthorizationProtocol' is ignored

No type or protocol named 'GTMSessionFetcherServiceProtocol' ; Reference to 'GTMSessionFetcherServiceProtocol' is ambiguous

If using Swift Package Manager, the project’s Package.resolved

Expand Package.resolved snippet

Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project’s Podfile.lock

Expand Podfile.lock snippet

PODS:
  - AFNetworking (4.0.1):
    - AFNetworking/NSURLSession (= 4.0.1)
    - AFNetworking/Reachability (= 4.0.1)
    - AFNetworking/Security (= 4.0.1)
    - AFNetworking/Serialization (= 4.0.1)
    - AFNetworking/UIKit (= 4.0.1)
  - AFNetworking/NSURLSession (4.0.1):
    - AFNetworking/Reachability
    - AFNetworking/Security
    - AFNetworking/Serialization
  - AFNetworking/Reachability (4.0.1)
  - AFNetworking/Security (4.0.1)
  - AFNetworking/Serialization (4.0.1)
  - AFNetworking/UIKit (4.0.1):
    - AFNetworking/NSURLSession
  - AppAuth (1.6.0):
    - AppAuth/Core (= 1.6.0)
    - AppAuth/ExternalUserAgent (= 1.6.0)
  - AppAuth/Core (1.6.0)
  - AppAuth/ExternalUserAgent (1.6.0):
    - AppAuth/Core
  - Firebase/Auth (9.6.0):
    - Firebase/CoreOnly
    - FirebaseAuth (~> 9.6.0)
  - Firebase/Core (9.6.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (~> 9.6.0)
  - Firebase/CoreOnly (9.6.0):
    - FirebaseCore (= 9.6.0)
  - Firebase/Database (9.6.0):
    - Firebase/CoreOnly
    - FirebaseDatabase (~> 9.6.0)
  - Firebase/DynamicLinks (9.6.0):
    - Firebase/CoreOnly
    - FirebaseDynamicLinks (~> 9.6.0)
  - Firebase/Functions (9.6.0):
    - Firebase/CoreOnly
    - FirebaseFunctions (~> 9.6.0)
  - Firebase/Installations (9.6.0):
    - Firebase/CoreOnly
    - FirebaseInstallations (~> 9.6.0)
  - Firebase/Messaging (9.6.0):
    - Firebase/CoreOnly
    - FirebaseMessaging (~> 9.6.0)
  - Firebase/Storage (9.6.0):
    - Firebase/CoreOnly
    - FirebaseStorage (~> 9.6.0)
  - FirebaseAnalytics (9.6.0):
    - FirebaseAnalytics/AdIdSupport (= 9.6.0)
    - FirebaseCore (~> 9.0)
    - FirebaseInstallations (~> 9.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/MethodSwizzler (~> 7.7)
    - GoogleUtilities/Network (~> 7.7)
    - "GoogleUtilities/NSData+zlib (~> 7.7)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - FirebaseAnalytics/AdIdSupport (9.6.0):
    - FirebaseCore (~> 9.0)
    - FirebaseInstallations (~> 9.0)
    - GoogleAppMeasurement (= 9.6.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/MethodSwizzler (~> 7.7)
    - GoogleUtilities/Network (~> 7.7)
    - "GoogleUtilities/NSData+zlib (~> 7.7)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - FirebaseAppCheckInterop (9.6.0)
  - FirebaseAuth (9.6.0):
    - FirebaseCore (~> 9.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/Environment (~> 7.7)
    - GTMSessionFetcher/Core (< 3.0, >= 1.7)
  - FirebaseAuthInterop (9.6.0)
  - FirebaseCore (9.6.0):
    - FirebaseCoreDiagnostics (~> 9.0)
    - FirebaseCoreInternal (~> 9.0)
    - GoogleUtilities/Environment (~> 7.7)
    - GoogleUtilities/Logger (~> 7.7)
  - FirebaseCoreDiagnostics (9.6.0):
    - GoogleDataTransport (< 10.0.0, >= 9.1.4)
    - GoogleUtilities/Environment (~> 7.7)
    - GoogleUtilities/Logger (~> 7.7)
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - FirebaseCoreExtension (9.6.0):
    - FirebaseCore (~> 9.0)
  - FirebaseCoreInternal (9.6.0):
    - "GoogleUtilities/NSData+zlib (~> 7.7)"
  - FirebaseCrashlytics (9.6.0):
    - FirebaseCore (~> 9.0)
    - FirebaseInstallations (~> 9.0)
    - GoogleDataTransport (< 10.0.0, >= 9.1.4)
    - GoogleUtilities/Environment (~> 7.7)
    - nanopb (< 2.30910.0, >= 2.30908.0)
    - PromisesObjC (~> 2.1)
  - FirebaseDatabase (9.6.0):
    - FirebaseCore (~> 9.0)
    - leveldb-library (~> 1.22)
  - FirebaseDynamicLinks (9.6.0):
    - FirebaseCore (~> 9.0)
  - FirebaseFunctions (9.6.0):
    - FirebaseAppCheckInterop (~> 9.0)
    - FirebaseAuthInterop (~> 9.0)
    - FirebaseCore (~> 9.0)
    - FirebaseCoreExtension (~> 9.0)
    - FirebaseMessagingInterop (~> 9.0)
    - FirebaseSharedSwift (~> 9.0)
    - GTMSessionFetcher/Core (< 3.0, >= 1.7)
  - FirebaseInstallations (9.6.0):
    - FirebaseCore (~> 9.0)
    - GoogleUtilities/Environment (~> 7.7)
    - GoogleUtilities/UserDefaults (~> 7.7)
    - PromisesObjC (~> 2.1)
  - FirebaseMessaging (9.6.0):
    - FirebaseCore (~> 9.0)
    - FirebaseInstallations (~> 9.0)
    - GoogleDataTransport (< 10.0.0, >= 9.1.4)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/Environment (~> 7.7)
    - GoogleUtilities/Reachability (~> 7.7)
    - GoogleUtilities/UserDefaults (~> 7.7)
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - FirebaseMessagingInterop (9.6.0)
  - FirebaseSharedSwift (9.6.0)
  - FirebaseStorage (9.6.0):
    - FirebaseAppCheckInterop (~> 9.0)
    - FirebaseAuthInterop (~> 9.0)
    - FirebaseCore (~> 9.0)
    - FirebaseCoreExtension (~> 9.0)
    - FirebaseStorageInternal (~> 9.0)
  - FirebaseStorageInternal (9.6.0):
    - FirebaseCore (~> 9.0)
    - GTMSessionFetcher/Core (< 3.0, >= 1.7)
  - Google-Mobile-Ads-SDK (9.14.0):
    - GoogleAppMeasurement (< 11.0, >= 7.0)
    - GoogleUserMessagingPlatform (>= 1.1)
  - GoogleAnalytics (3.20.0)
  - GoogleAppMeasurement (9.6.0):
    - GoogleAppMeasurement/AdIdSupport (= 9.6.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/MethodSwizzler (~> 7.7)
    - GoogleUtilities/Network (~> 7.7)
    - "GoogleUtilities/NSData+zlib (~> 7.7)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - GoogleAppMeasurement/AdIdSupport (9.6.0):
    - GoogleAppMeasurement/WithoutAdIdSupport (= 9.6.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/MethodSwizzler (~> 7.7)
    - GoogleUtilities/Network (~> 7.7)
    - "GoogleUtilities/NSData+zlib (~> 7.7)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - GoogleAppMeasurement/WithoutAdIdSupport (9.6.0):
    - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    - GoogleUtilities/MethodSwizzler (~> 7.7)
    - GoogleUtilities/Network (~> 7.7)
    - "GoogleUtilities/NSData+zlib (~> 7.7)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - GoogleDataTransport (9.2.0):
    - GoogleUtilities/Environment (~> 7.7)
    - nanopb (< 2.30910.0, >= 2.30908.0)
    - PromisesObjC (< 3.0, >= 1.2)
  - GoogleMaps (4.2.0):
    - GoogleMaps/Maps (= 4.2.0)
  - GoogleMaps/Base (4.2.0)
  - GoogleMaps/Maps (4.2.0):
    - GoogleMaps/Base
  - GooglePlaces (4.2.0):
    - GoogleMaps/Base (= 4.2.0)
  - GoogleSignIn (7.0.0):
    - AppAuth (~> 1.5)
    - GTMAppAuth (< 3.0, >= 1.3)
    - GTMSessionFetcher/Core (< 4.0, >= 1.1)
  - GoogleUserMessagingPlatform (2.0.1)
  - GoogleUtilities/AppDelegateSwizzler (7.11.0):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
  - GoogleUtilities/Environment (7.11.0):
    - PromisesObjC (< 3.0, >= 1.2)
  - GoogleUtilities/Logger (7.11.0):
    - GoogleUtilities/Environment
  - GoogleUtilities/MethodSwizzler (7.11.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/Network (7.11.0):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (7.11.0)"
  - GoogleUtilities/Reachability (7.11.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/UserDefaults (7.11.0):
    - GoogleUtilities/Logger
  - GTMAppAuth (2.0.0):
    - AppAuth/Core (~> 1.6)
    - GTMSessionFetcher/Core (< 4.0, >= 1.5)
  - GTMSessionFetcher/Core (2.3.0)
  - InstantSearchClient (7.0.5)
  - IQKeyboardManagerSwift (6.5.11)
  - KeychainSwift (20.0.0)
  - leveldb-library (1.22.1)
  - nanopb (2.30909.0):
    - nanopb/decode (= 2.30909.0)
    - nanopb/encode (= 2.30909.0)
  - nanopb/decode (2.30909.0)
  - nanopb/encode (2.30909.0)
  - ObjectMapper (4.2.0)
  - PersonalizedAdConsent (1.0.5)
  - PromisesObjC (2.1.1)
  - ReachabilitySwift (5.0.0)
  - SDWebImage (5.15.0):
    - SDWebImage/Core (= 5.15.0)
  - SDWebImage/Core (5.15.0)
  - SVProgressHUD (2.2.5)
  - SwiftPhoneNumberFormatter (1.5)
  - SwiftyJSON (5.0.1)
  - SwiftyStoreKit (0.16.1)

DEPENDENCIES:
  - AFNetworking
  - Firebase/Auth
  - Firebase/Core
  - Firebase/Database
  - Firebase/DynamicLinks
  - Firebase/Functions
  - Firebase/Installations
  - Firebase/Messaging
  - Firebase/Storage
  - FirebaseAnalytics
  - FirebaseCrashlytics
  - Google-Mobile-Ads-SDK
  - GoogleAnalytics
  - GoogleMaps
  - GooglePlaces
  - GoogleSignIn
  - InstantSearchClient (~> 7.0)
  - IQKeyboardManagerSwift
  - KeychainSwift
  - ObjectMapper
  - PersonalizedAdConsent
  - ReachabilitySwift
  - SDWebImage
  - SVProgressHUD
  - SwiftPhoneNumberFormatter
  - SwiftyJSON
  - SwiftyStoreKit

SPEC REPOS:
  trunk:
    - AFNetworking
    - AppAuth
    - Firebase
    - FirebaseAnalytics
    - FirebaseAppCheckInterop
    - FirebaseAuth
    - FirebaseAuthInterop
    - FirebaseCore
    - FirebaseCoreDiagnostics
    - FirebaseCoreExtension
    - FirebaseCoreInternal
    - FirebaseCrashlytics
    - FirebaseDatabase
    - FirebaseDynamicLinks
    - FirebaseFunctions
    - FirebaseInstallations
    - FirebaseMessaging
    - FirebaseMessagingInterop
    - FirebaseSharedSwift
    - FirebaseStorage
    - FirebaseStorageInternal
    - Google-Mobile-Ads-SDK
    - GoogleAnalytics
    - GoogleAppMeasurement
    - GoogleDataTransport
    - GoogleMaps
    - GooglePlaces
    - GoogleSignIn
    - GoogleUserMessagingPlatform
    - GoogleUtilities
    - GTMAppAuth
    - GTMSessionFetcher
    - InstantSearchClient
    - IQKeyboardManagerSwift
    - KeychainSwift
    - leveldb-library
    - nanopb
    - ObjectMapper
    - PersonalizedAdConsent
    - PromisesObjC
    - ReachabilitySwift
    - SDWebImage
    - SVProgressHUD
    - SwiftPhoneNumberFormatter
    - SwiftyJSON
    - SwiftyStoreKit

SPEC CHECKSUMS:
  AFNetworking: 3bd23...
  AppAuth: 8fca6...
  Firebase: 5ae8...
  FirebaseAnalytics: 89ad...
  FirebaseAppCheckInterop: d5ec...
  FirebaseAuth: e4a5...
  FirebaseAuthInterop: b6cf...
  FirebaseCore: 2082...
  FirebaseCoreDiagnostics: 99a49...
  FirebaseCoreExtension: e834...
  FirebaseCoreInternal: bca7...
  FirebaseCrashlytics: 3210...
  FirebaseDatabase: 3de1...
  FirebaseDynamicLinks: 894e...
  FirebaseFunctions: f9d4...
  FirebaseInstallations: 0a11...
  FirebaseMessaging: a4d7...
  FirebaseMessagingInterop: 34878...
  FirebaseSharedSwift: 2269...
  FirebaseStorage: 1fea...
  FirebaseStorageInternal: 81d8...
  Google-Mobile-Ads-SDK: 4fe6...
  GoogleAnalytics: 01e4...
  GoogleAppMeasurement: 6de2...
  GoogleDataTransport: 1c81...
  GoogleMaps: eb03...
  GooglePlaces: 196a...
  GoogleSignIn: b232...
  GoogleUserMessagingPlatform: 5f8b...
  GoogleUtilities: c2bd...
  GTMAppAuth: 99fb...
  GTMSessionFetcher: 3a63...
  InstantSearchClient: cd4b...
  IQKeyboardManagerSwift: c7955...
  KeychainSwift: 0ce6...
  leveldb-library: 50c7b...
  nanopb: b552...
  ObjectMapper: 1eb4...
  PersonalizedAdConsent: dbeca...
  PromisesObjC: ab77f...
  ReachabilitySwift: 98503...
  SDWebImage: 9bec4...
  SVProgressHUD: 1428a...
  SwiftPhoneNumberFormatter: 0cc91...
  SwiftyJSON: 2f33a...
  SwiftyStoreKit: 6b9c0...

PODFILE CHECKSUM: c039d...

COCOAPODS: 1.11.3

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Pod/** is what gets generated by recursively

Here is a screenshot of the error logs:

Screen Shot 2023-01-22 at 3 01 21 AM

Here’s something that I just noticed, GTMSessionFetcherLogging.h has a #import "GTMSessionFetcher/GTMSessionFetcher.h" Error of Include of non-modular header inside framework module 'GTMSessionFetcher.GTMSessionFetcherLogging'

Screen Shot 2023-01-22 at 2 34 58 AM Screen Shot 2023-01-22 at 2 30 28 AM

But GTMSessionFetcherService.h and GTMSessionUploadFetcher.h which uses the same #import "GTMSessionFetcher/GTMSessionFetcher.h" doesn’t have the errors.

Screen Shot 2023-01-22 at 2 29 03 AM Screen Shot 2023-01-22 at 2 28 17 AM

GTMSessionFetcherService+Internal.h which uses GTMSessionFetcherService.h is fine:

Screen Shot 2023-01-22 at 2 27 33 AM