當我嘗試通過 xcode 將我的 flutter 應用程式構建為存檔時,構建失敗,因為Module 'cloud_firestore' not found 在檔案GeneratedPluginRegistrant.m.
如果我通過在終端上創建存檔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沒有任何效果。
按照此處的建議更新部署目標不起作用。
uj5u.com熱心網友回復:
.xcodeproj當您打開檔案而不是檔案時,可能會出現此錯誤訊息.xcworkspace。
其中.xcworkspace不僅包含app專案本身,還包含cocoapods生成的一個專案,用于管理所有的依賴。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/536525.html
標籤:ios代码扑
