从命令行生成 .xcscheme 文件 [英] Generate an .xcscheme file from the command line

查看:49
本文介绍了从命令行生成 .xcscheme 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我公司的持续集成服务器上工作,但由于服务器无法访问 xcode 项目中的方案,因此构建过程失败.

I am working on my company's continuous integration server, and the build process is failing because the server does not have access to schemes in an xcode project.

基本上,他们使用 Cmake 动态生成 xcode 项目以用于单个构建,然后在下一次签入之前丢弃.

Basically, they are using Cmake to generate xcode projects on the fly to be used for a single build, and then discarded until the next check in.

我的研究表明,如果有一个带有 .xcodeproj 文件的 .xcscheme 文件,这个问题将得到解决,但由于各种原因无法提前生成和签入.

My research indicates that this problem will be fixed if there is an .xcscheme file with the .xcodeproj file, but for various reasons that can't be generated and checked in ahead of time.

有没有办法使用 xcodebuild 或其他一些命令行工具生成这个文件,以便我们可以将它处理到现有的构建 shell 脚本中?

Is there a way to generate this file using xcodebuild or some other command line tool so that we can work it into existing build shell scripts?

xcodebuild 文档、google 和 S.O.出人意料地缺乏这个话题.

The xcodebuild documentation, google, and S.O. are surprisingly lacking on this topic.

推荐答案

我实际上能够通过使用 cmake 生成项目,然后使用 xcode gui 制作我需要的方案文件来做到这一点.我使用终端从项目中提取 xcscheme 文件,并将它们放在另一个由源代码管理跟踪的目录中.作为生成过程的一部分,我只是添加了一些 shell 脚本,将我之前制作的副本复制到新生成的项目中,然后照常继续构建过程.

I was actually able to do this by using cmake to generate the project, then using the xcode gui to make the scheme files I need. I used the terminal to extract the xcscheme files from the project and put them in another directory being tracked by source control. As part of the generation process, I just added a bit of shell script to copy the copies I made earlier into the newly generated project, then continue the build process as normal.

这篇关于从命令行生成 .xcscheme 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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