当我尝试通过xcode将flutter应用构建为归档时,构建失败,因为文件GeneratedPluginRegistrant.m
中存在Module 'cloud_firestore' not found
。
如果我通过flutter build ipa
在终端上创建存档,我不会收到此错误。
当我试图通过Xcode构建应用程序时,我收到了同样的错误。在Android Studio中,一切都运行正常。
我的播客文件:
# 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
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.0.0'
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)
end
end
我已经删除了Podfile
、Podfile.lock
,运行了pod update
、pod install
,没有任何工作。
按建议更新部署目标here不起作用。
1条答案
按热度按时间0yg35tkg1#
当您打开
.xcodeproj
而不是.xcworkspace
文件时,可能会出现此错误信息。.xcworkspace
不仅包含app项目本身,还包含cocopods生成的项目,用于管理所有依赖项。