CocoaPods could not find compatible versions for pod "FirebaseAppCheck"

Issue

When i try to run my app on an ios device simulator (IOS 15.4) here what happen :

[!] CocoaPods could not find compatible versions for pod "FirebaseAppCheck":
In Podfile:
firebase_app_check (from .symlinks/plugins/firebase_app_check/ios) was resolved to 0.0.6-7, which depends on
FirebaseAppCheck (~> 7.7.0-beta)

None of your spec sources contain a spec satisfying the dependency: FirebaseAppCheck (~> 7.7.0-beta).

In my pubspec.yaml there is Firebase app firebase_app_check: ^0.0.6+7.

Here my podfile :

# Override Firebase SDK Version
$FirebaseSDKVersion = '7.7.0'

# Uncomment this line to define a global platform for your project
platform :ios, '10.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__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
    end
  end
end

Here what i already tried :

  • flutter clean
  • pod deintegrate
  • pod install -repo update
  • flutter pub get
  • deleting the pods directory and pod.lock and try pod install

Can someone help me ? Thanks in advance.

Solution

Change the Firebase SDK version to at least 8.5.0.

AppCheck was introduced in Firebase 8.0.0 for iOS 11+ and support added for iOS 10 in 8.5.0.

See the available podspecs at https://github.com/CocoaPods/Specs/tree/master/Specs/1/8/e/FirebaseAppCheck

Answered By – Paul Beusterien

Answer Checked By – Senaida (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *