【发布时间】:2018-03-24 21:12:38
【问题描述】:
我的应用与 Firebase RTDB 一起工作,但想尝试使用 Firestore,所以我按照说明安装了“firebase_firestore”插件。
当我现在运行我的应用程序时,我收到以下错误:
Resolving dependencies of `Podfile`
[!] Unable to satisfy the following requirements:
- `Firebase/Firestore` required by `firebase_firestore (0.0.1)`
Specs satisfying the `Firebase/Firestore` dependency were found, but they required a higher minimum deployment target.
我尝试在我的 Podfile 中指定 platform :ios, '9.0' 和 10.0,但这并没有任何区别。所有其他 pod 都可以正常安装。
这是整个 Cocoapods 运行日志:https://pastebin.com/raw/SBz8Bqgf
我的 Podfile 看起来像这样(标准 Flutter Podfile):
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
if ENV['FLUTTER_FRAMEWORK_DIR'] == nil
abort('Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework')
end
target 'Runner' do
# Pods for Runner
# Flutter Pods
pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
if File.exists? '../.flutter-plugins'
flutter_root = File.expand_path('..')
File.foreach('../.flutter-plugins') { |line|
plugin = line.split(pattern='=')
if plugin.length == 2
name = plugin[0].strip()
path = plugin[1].strip()
resolved_path = File.expand_path("#{path}/ios", flutter_root)
pod name, :path => resolved_path
else
puts "Invalid plugin specification: #{line}"
end
}
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
这是 Podfile.lock 的链接,也许这更有趣。我看到它没有用 Firestore 更新,大概是因为运行失败:https://pastebin.com/raw/hj2jHE76
【问题讨论】:
-
请更新您的问题以包含来自您的
Podfile的代码。 -
嗨@JenPerson - 我添加了 Podfile + Cocoapods 运行的日志。 Podfile 是 AFAIK 标准的 Flutter Podfile,不记得对其进行过更改(尝试指定平台版本除外)
标签: firebase cocoapods google-cloud-firestore flutter