我的.travis.yml
文件:
language: objective-c
script:
xctool -workspace ProjectName.xcworkspace -scheme ProjectName build -sdk iphonesimulator
当 Travis-CI 正在构建该项目时,它说:
$ bundle --version
Bundler version 1.7.4
$ xcodebuild -version -sdk
$ pod --version
0.34.4
Installing Pods with 'pod install'
$ pushd .
~/build/GabrielMassana/ProjectName-iOS
$ pod install
安装 Pod 时出现错误:
The command "eval pod install" failed. Retrying, 2 of 3.
The command "eval pod install" failed. Retrying, 3 of 3.
The command "eval pod install" failed 3 times.
The command "pod install" failed and exited with 1 during .
Your build has been stopped.
最佳答案
我发现添加这一行可以解决我的问题。
before_install:
- rvm use system
- sudo gem install cocoapods -v '0.39.0'
所以我的最终 .travis.yml
文件:
language: objective-c
before_install:
- rvm use system
- sudo gem install cocoapods -v '0.39.0'
script:
xctool -workspace ProjectName.xcworkspace -scheme ProjectName build -sdk iphonesimulator
现在 cocoapods 已完成安装。
可能某些 Travis 机器设置为运行旧版本 (0.34.4)
关于ios - Travis-CI 错误为 "eval pod install",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35187768/