skip to Main Content

I’m trying to

pod install

for my project but it does not work it gives this error:
I updated my Xcode to 15, macOS to 14. There was no problem in previous versions.

Flutter Version: 3.19.

[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
  In Podfile:
    firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 2.0.0, which depends on
      Firebase/Auth (= 9.6.0) was resolved to 9.6.0, which depends on
        FirebaseAuth (~> 9.6.0) was resolved to 9.6.0, which depends on
          GTMSessionFetcher/Core (< 3.0, >= 1.7)

    google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
      GTMSessionFetcher (>= 3.4.0) was resolved to 3.4.1, which depends on
        GTMSessionFetcher/Full (= 3.4.1) was resolved to 3.4.1, which depends on
          GTMSessionFetcher/Core (= 3.4.1)

    google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
      GoogleSignIn (~> 7.1) was resolved to 7.1.0, which depends on
        GTMAppAuth (< 5.0, >= 4.1.1) was resolved to 4.1.1, which depends on
          GTMSessionFetcher/Core (< 4.0, >= 3.3)

    google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
      GoogleSignIn (~> 7.1) was resolved to 7.1.0, which depends on
        GTMSessionFetcher/Core (~> 3.3)

Podfile:

# Uncomment this line to define a global platform for your project
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  target 'RunnerTests' do
    inherit! :search_paths
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

Some firebase libraries in my pubspec.yaml:

  firebase_analytics: ^8.1.2
  firebase_auth: ^2.0.0
  firebase_core: ^1.3.0
  firebase_messaging: ^10.0.3
  firebase_storage: ^9.0.0
  cloud_firestore: ^2.3.0
  google_sign_in: ^5.0.4

How can I solve my problem? I will be happy if you help.
What is the problem? Maybe firebase, maybe xcode, maybe macos, maybe flutter

2

Answers


  1. Try to update your pods like this:

    1. Go to ios folder
    2. pod deintegrate
    3. pod init
    4. pod install
    5. pod repo update

    This guide always helps me when I update os version or xcode version and everything stop working

    Login or Signup to reply.
  2. I just came across the same issue. What worked for me was updating the libraries to the most current version.

    See the answer from github too:https://github.com/flutter/flutter/issues/148116

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search