ios - 如何删除在 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(unwanted pod),我收到以下错误:
GoogleUtilities/GULAppEnvironmentUtil.h' file not found
解决方案
推荐阅读
- swift - 对于表视图中的集合视图,如何从 Firebase 中检索相同索引路径的数据?
- python - 如何在 Sphinx 中正确定义新的警告?
- npm - 将我的 reactTS 应用程序构建到竹子并将其部署到 nexus 需要哪些任务?
- mysql - 当我们连接到 MS SQL/MySQL 数据库时,如何确保我和客户的 PC 始终具有相同的 IP 地址?
- ruby-on-rails - 在 Rails 中呈现自定义 json 数组
- python-3.x - 将名字列表与姓氏列表相结合以创建全名
- firebase - 如何使用代理服务器来使用firebase auth
- typescript - 打字稿映射和/或减少:将数组映射到其他数组类型
- javascript - 带有过滤器的背景图像未拉伸到画布的全宽-fabric.js
- sql - 如何在 PostgreSQL 中提取相关值?