未找到云火存储插件文件



我在运行"颤振构建iOS"时遇到了以下问题:

'cloud_firestore/CloudFirestorePlugin.h' file not found #import <cloud_firestore/CloudFirestorePlugin.h>`

应用程序与我的iPhone和虚拟iPhone完美配合

Cocopod 在最新版本上

xcode: 11.2.1

软件包: cloud_firestore: ^0.12.10+2//最新版本

豆荚文件

platform :ios, '13.1'
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
use_frameworks!
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
install! 'cocoapods', :disable_input_output_paths => true
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

附言。删除了注释行以使代码更短。

有谁知道这个任务有什么问题?

我得到了同样的错误。

尝试以下为我修复它的方法:

在 Xcode 中,转到"文件>工作区设置",然后选择"旧版构建系统">

在我的 podfile 中 - 我有platform :ios, '9.0'不确定您是否需要这个,但仅供参考,因为我看到您的版本13.1

如果使用 VS Code,您可能还需要从<your_project_name/ios目录中的命令行运行pod install(因为 VS Code 没有正确运行/完成 pod 安装;VS 代码版本 1.40.2(

请注意:我还发现在模拟器上启动初始构建>需要花费大量时间。我使用的是2012 Macbook Pro,这是一个重要原因,但仅供参考。它最终确实在模拟器上启动,之后热重载工作正常

最新更新