首页 > 解决方案 > Fastlane Flutter pod安装警告ios

问题描述

我正在使用 Fastlane 进行 Flutter 的持续部署。

build当我尝试在 Fastlane Fastfile 中运行 Flutter命令时,我收到警告:

▸ 警告:未安装 CocoaPods。跳过 pod 安装。▸ CocoaPods 用于检索 iOS 和 macOS 平台端的插件代码,以响应您在 Dart 端的插件使用情况。▸ 如果没有 CocoaPods,插件将无法在 iOS 或 macOS 上运行。▸ 欲了解更多信息,请参阅 https://flutter.dev/platform-plugins ▸ 安装: ▸ brew install cocoapods ▸ pod setup

build但是当我从 bash(不在 Fastfile 中)运行 Flutter 时,我没有收到此错误

这是我在 Fastfile 中运行的命令:

  lane :beta do

    sh "cd /folder/folder/exampleapp && flutter clean && flutter build ios --no-codesign"

...
end

有谁知道为什么?

编辑:这个错误是非致命的。构建提交到应用商店,Fastlane 完成。这个错误有问题吗?我正在使用 Firebase 插件(核心、消息传递、firestore),所以我的应用中有 pod。我认为这可能会导致问题,但我有测试应用程序和 firebase 仍然可以正常工作。

标签: iosfirebasefluttercocoapodsfastlane

解决方案


添加gem "cocoapods"到您的 Gemfile,然后:

bundle install && bundle exec fastlane beta

推荐阅读