我的codemagic工作流程中的cocoapods版本低于Flutter项目使用的版本。如何为我的Codemagic工作流程设置特定版本的cocoapods?
谢谢
索伦
答案 0 :(得分:1)
如果您在构建日志中收到类似消息
[!] The version of CocoaPods used to generate the lockfile (1.7.2) is higher than the version of the current executable (1.6.1). Incompatibility issues may arise.
然后您需要先卸载默认的CocoaPods版本,然后再安装正确的版本。您可以通过下一个预构建脚本来完成此操作。
#!/bin/sh
set -e # exit on first failed command
set -x # print all executed commands to the log
yes | gem uninstall cocoapods -v 1.6.1 || true
gem install cocoapods -v 1.7.2
cd $FCI_BUILD_DIR/ios
pod install