如何解决如何删除在 Flutter 中安装的不需要的 Pod
我是 Flutter 开发的新手。我在使用 Flutter iOS 和 Xcode 时发现问题。我可以看到不需要的 Pod 被安装,这会在我的 Xcode 构建过程中导致错误。我想知道是否有办法控制安装的 Pod。
以下是我的 Podfile 的代码:
ENV['COCOAPODS_disABLE_STATS'] = 'true'
project 'Runner',{
'Debug' => :debug,'Profile' => :release,'Release' => :release,}
pod 'Firebase/Auth'
pod 'Firebase/Analytics'
pod 'Firebase/Core'
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
#install! 'cocoapods',:deterministic_uuids => false
target 'Runner' do
#use_frameworks!
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
由于 GoogleUtilities(不需要的 pod),我收到以下错误:
GoogleUtilities/GULAppEnvironmentUtil.h' file not found
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。