CocoaPods无法找到Pod“FirebaseAppCheck”的兼容版本

ubof19bj  于 2023-03-24  发布在  其他
关注(0)|答案(2)|浏览(147)

当我尝试在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。
这里是我的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

下面是我已经尝试过的:

  • Flutter清理
  • 荚解体
  • pod install -repo update
  • Flutter 酒吧
  • 删除pod目录和pod.lock并尝试pod安装

有人能帮帮我吗?先谢谢你了。

p3rjfoxz

p3rjfoxz1#

正如@PaulBeusterien所说:
我只需要用Firebase SDK的适当版本和适当的平台目标更新我的podfile。
下面是我的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
hmae6n7t

hmae6n7t2#

将Firebase SDK版本至少更改为8.5.0。
AppCheck在iOS 11+的Firebase 8.0.0中引入,并在8.5.0中添加了对iOS 10的支持。
请参阅https://github.com/CocoaPods/Specs/tree/master/Specs/1/8/e/FirebaseAppCheck上提供的播客规范

相关问题