Travis-CI with: ERROR: Cannot find schemes

Travis-CI with: ERROR: Cannot find schemes

这是我的 .travis.yml 文件

language: objective-c

osx_image: xcode7.2

script: 
   xctool -project ProjectName.xcodeproj -scheme ProjectName build -sdk iphonesimulator

虽然 Travis 运行 我遇到了这个错误:

$ xctool -project ProjectName.xcodeproj -scheme ProjectName build -sdk iphonesimulator

ERROR: Cannot find schemes. Please consider creating shared schemes in Xcode.

TIP: This might happen if you're relying on Xcode to autocreate your schemes and your scheme files don't yet exist. xctool, like xcodebuild, isn't able to automatically create schemes. We recommend disabling "Autocreate schemes" in your workspace/project, making sure your existing schemes are marked as "Shared", and making sure they're checked into source control.

这个问题很容易解决:

转到您的项目方案并单击 Manage Schemes...

为您的方案勾选Shared

单击 Close,提交并推送。

问题已解决。现在 Travis 工作没有问题。

I also wrote a post in my blog about Travis-CI.

除了 Gabriel.Massana 的回答之外,确保文件已签入版本控制 (SVN/GIT)。