iOS framework addition failed due to a CocoaPods installation failure. Firebase/GoogleSignIn

I got this error whenever I try to build for iOS platform on Unity:

 iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.
    
    After the failure, "pod repo update" was executed and succeeded. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions.
    
    pod install output:
    
    Analyzing dependencies
    [!] CocoaPods could not find compatible versions for pod "FirebaseCore":
      In Podfile:
        Firebase/Auth (= 11.4.2) was resolved to 11.4.2, which depends on
          Firebase/CoreOnly (= 11.4.2) was resolved to 11.4.2, which depends on
            FirebaseCore (= 11.4.2)
    
        Firebase/Auth (= 11.4.2) was resolved to 11.4.2, which depends on
          FirebaseAuth (~> 11.4.0) was resolved to 11.4.0, which depends on
            FirebaseCore (~> 11.4)
    
        Firebase/Core (= 11.4.2) was resolved to 11.4.2, which depends on
          FirebaseAnalytics (~> 11.4.0) was resolved to 11.4.0, which depends on
            FirebaseCore (~> 11.0)
    
        Firebase/Core (= 11.4.2) was resolved to 11.4.2, which depends on
          FirebaseAnalytics (~> 11.4.0) was resolved to 11.4.0, which depends on
            FirebaseInstallations (~> 11.0) was resolved to 11.5.0, which depends on
              FirebaseCore (= 11.5)
    
    CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
      In Podfile:
        Firebase/Auth (= 11.4.2) was resolved to 11.4.2, which depends on
          FirebaseAuth (~> 11.4.0) was resolved to 11.4.0, which depends on
            GTMSessionFetcher/Core (< 5.0, >= 3.4)
    
        GoogleSignIn (~> 6.0.2) was resolved to 6.0.2, which depends on
          GTMAppAuth (~> 1.0) was resolved to 1.0.0, which depends on
            GTMSessionFetcher (~> 1.1) was resolved to 1.1.0, which depends on
              GTMSessionFetcher/Full (= 1.1.0) was resolved to 1.1.0, which depends on
                GTMSessionFetcher/Core (= 1.1.0)
    
        GoogleSignIn (~> 6.0.2) was resolved to 6.0.2, which depends on
          GTMSessionFetcher/Core (< 4.0, >= 2.1)
    
    
    
    
    
    pod repo update output:
    
    Updating spec repo `trunk`
    
    
    
    UnityEngine.Debug:LogError (object)
    Google.Logger:Log (string,Google.LogLevel) (at /Users/amaurice/Documents/GitHub/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:136)
    Google.IOSResolver:Log (string,bool,Google.LogLevel) (at /Users/amaurice/Documents/GitHub/unity-jar-resolver/source/IOSResolver/src/IOSResolver.cs:1247)
    Google.IOSResolver:OnPostProcessInstallPods (UnityEditor.BuildTarget,string) (at /Users/amaurice/Documents/GitHub/unity-jar-resolver/source/IOSResolver/src/IOSResolver.cs:2799)
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:203)

Another problem is, when I check the Firebase version on my unity, it says I’m using Firebase Realtime Database: [12.4.1], Firebase Authentication: [12.4.1], External Dependency Manager: [1.2.183]

but on my podfile it says I’m using version 11.4.2 for the Firebase package:

source 'https://cdn.cocoapods.org/'
    
    platform :ios, '13.0'
    
    target 'UnityFramework' do
      pod 'Firebase/Auth', '11.4.2'
      pod 'Firebase/Core', '11.4.2'
      pod 'Firebase/Database', '11.4.2'
      pod 'GoogleSignIn', '~> 6.0.2'
    end
    target 'Unity-iPhone' do
    end
    use_frameworks! :linkage => :static

What I have tried: downgrade the cocoapods to v1.10.2, disable Use Shell to Execute Cocoapod Tool, still get the same errors.
Also changed my GoogleSignIn.podspec.json
"GTMSessionFetcher/Core": [ ">= 2.1", "< 4.0" ] (from ~> 1.1)

If I just try to build it from the Unity-iPhone.xcodeproj on Xcode, I will get googlesignin/gidsignin.h file not found.

For now I’m using the latest version cocoapods.
Thank you