“错误:意外的动作:生成"在Travis-CI上使用Swift 3和Cocoapods构建项目时 [英] "ERROR: Unexpected action: build" when building a project with Swift 3 and Cocoapods on Travis-CI

查看:159
本文介绍了“错误:意外的动作:生成"在Travis-CI上使用Swift 3和Cocoapods构建项目时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

晚上/早晨/下午全部

现在我被这个问题困扰了一段时间,在网上找不到任何关于此的信息,所以我最好的选择就是这里.

Been hitting my head over this for a bit now and couldn't find anything online about this so my best bet is here.

当Travis-CI构建我的项目时,出现以下错误:

When Travis-CI builds my project I get the following error:

 xctool -workspace Project.xcworkspace -scheme ProjectTests build test

 ERROR: Unexpected action: build

这是我的配置:

language: objective-c
xcode_workspace: Project.xcworkspace
xcode_scheme: ProjectTests
osx_image: xcode8.2

也许我错过了本教程中的某些内容?我在pods依赖项部分有些迷路,但我相信我做对了.这是在创建新方案(ProjectTests)和原始方案(Project)的情况下发生的.我像上面说的那样在Build阶段添加了ProjectTests方案的依赖项,但仍然没有骰子.有什么想法吗?

Perhaps I missed something in the tutorial? I got a little lost on the pods dependency section but I believe I did it right. This happens with a new scheme (ProjectTests) created and with the original scheme (Project). I added the dependencies for the ProjectTests scheme in the Build phase like it said but still no dice. Any ideas?

推荐答案

弄清楚了(至少在我的情况下)xctool不起作用,所以我改用xcodebuild起作用了.这是我输入的内容:

Figured it out (at least in my situation) xctool wasn't working so I used xcodebuild instead and it worked. Here is what I put in:

script:
    - xcodebuild clean build -sdk iphonesimulator -workspace Project.xcworkspace -scheme ProjectTests CODE_SIGNING_REQUIRED=NO

这篇关于“错误:意外的动作:生成"在Travis-CI上使用Swift 3和Cocoapods构建项目时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆