CocoaPods 找不到 pod "FirebaseAppCheck" 的兼容版本

CocoaPods could not find compatible versions for pod "FirebaseAppCheck"

当我尝试在 ios 设备模拟器 (IOS 15.4) 上 运行 我的应用时,发生了什么:

[!] 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).

在我的 pubspec.yaml 中有 Firebase 应用 firebase_app_check: ^0.0.6+7.

这是我的播客文件:

# 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

这是我已经尝试过的:

有人可以帮助我吗?提前致谢。

将 Firebase SDK 版本至少更改为 8.5.0。

AppCheck 是在 Firebase 8.0.0 中针对 iOS 11+ 引入的,并在 8.5.0 中添加了对 iOS 10 的支持。

https://github.com/CocoaPods/Specs/tree/master/Specs/1/8/e/FirebaseAppCheck

查看可用的 podspec

正如@PaulBeusterien 所说:

我只需要使用适合 Firebase SDK 的版本和适合的平台目标来更新我的 podfile。

下面是我的播客文件:

# Override Firebase SDK Version
$FirebaseSDKVersion = '8.5.0'

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