gpt4 book ai didi

ios - CocoaPods 生成的项目的 .travis.yml 中无法识别语言

转载 作者:行者123 更新时间:2023-11-28 07:54:29 24 4
gpt4 key购买 nike

我在 Swift 中创建了一个 CocoaPods 项目。但是 Travis 中的构建总是失败。错误信息是:

The command "rake" exited with 1.

我发现 Travis 中的语言被识别为 Ruby 而不是 Swift (Objective-C)。这是屏幕截图:

enter image description here

我的 .travis.yml 是:

osx_image: xcode7.3
language: objective-c
# cache: cocoapods
# podfile: Example/Podfile
# before_install:
# - gem install cocoapods # Since Travis is not always on latest version
- pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/WOWGallery.xcworkspace -scheme WOWGallery-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint

知道可能是什么原因吗?谢谢

最佳答案

如文档中所述 Travis-ci

Language availability. Not all languages are available on all operating systems, and different versions maybe installed on different systems.

{ "os": "osx", "script": ["set -o pipefail && xcodebuild test -destination 'platform=iOS Simulator,name=iPhone 6s' -workspace Example/FullAuthIOSClient.xcworkspace -scheme FullAuthIOSClient-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty",
"pod lib lint --allow-warnings"], "podfile": "Example/Podfile", "language": "objective-c", "osx_image": "xcode9.4", "before_install": [
"gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet" ] }

在您的配置文件中,“os”值被提及为 linux。尝试在 mac 平台而不是 linux 中添加您的项目。

引用:Os Support Status

关于ios - CocoaPods 生成的项目的 .travis.yml 中无法识别语言,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48681903/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com