flutter - 如何将 CocoaPod 添加到 Flutter 项目中?
问题描述
很难找到有关如何将特定 Pod 添加到我的 Flutter 项目以支持 iOS 的任何信息。Podfile 是自动生成的,因此似乎不只是将其添加到 Podfile 是要走的路。还是我完全错了,我应该只更新 Podfile 和git add
Podfile 以及它的 .lock 文件?
解决方案
我认为这取决于您的具体情况。作为一般规则,我没有将文件添加到 podfile,尽管我通常必须在我下载的 repos 上执行“podfile install”。
但是,当我不得不这样做时,它总是支持 Firebase。
几个月前我不得不安装firebase并且不得不将它添加到podfile中,我想我看到了这个条目: Flutter Podfile and Firebase
也许还是这样,因为我找到了这个教程,第 4 步表明应该将 firebase SDK 添加到 podfile 中,并且该文章的日期为 2019 年 12 月下旬: https ://www.freecodecamp.org/news/how -to-integrate-your-ios-flutter-app-with-firebase-on-macos-6ad08e2714f0/
所以,我认为答案是“是的……但通常不会”
对于那个项目,我必须将 podfile 添加到 repo,并且我还必须添加 build.gradle 文件,所以我认为它不合适。
推荐阅读
- python - 如何返回数字的小数部分?
- postgresql - 如何在另一台计算机上打开现有的 PostgreSQL 数据库?
- google-chrome-extension - 对 dev 和 prod chrome 扩展使用不同的图标
- arrays - 如何将 atoi 和 strtok 与多维数组一起使用?
- swift - Swift - 数组到字典
- android - 使用 FCM 发送单独的推送通知
- r - 如何向圆环图添加额外的数据标签
- node.js - 尝试从 nodejs.org 在 Windows 10 上安装 node.js(v15.3.0) 时出错
- python - pytesseract 无法识别图像中的数字,
- haskell - 强制在堆栈中进行静态编译