如何在Xcode 10的`xcodebuild`中使用旧版构建系统? [英] How can I use the legacy build system with Xcode 10's `xcodebuild`?

查看:221
本文介绍了如何在Xcode 10的`xcodebuild`中使用旧版构建系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Xcode 10的新构建系统进行开发,但是由于生成的 xcarchive 存在一个问题,我们在持续集成系统中的构建失败了: xcarchive 中的 Info.plist 缺少 ApplicationProperties 键以及其中的信息!

I'd like to use the new build system of Xcode 10 for development, but our build in our continuous integration system fails since the xcarchive produced has an issue: the Info.plist in the xcarchive is missing the ApplicationProperties key and the information therein!

事实证明,切换回旧版构建系统可以解决此问题。这可以在工作空间设置(文件>工作空间设置…>构建系统)中完成。但是我宁愿保留新的构建系统进行开发,而仅将旧的构建系统用于CI构建。

It turns out switching back to the legacy build system fixes this. This can be done in the workspace settings (File > Workspace Settings… > Build System). But I would prefer to keep the new build system for development and only use the legacy build system for CI builds.

有没有办法使 xcodebuild 使用旧版构建系统而不修改工作区?

Is there a way to make xcodebuild use the legacy build system without modifying the workspace?

推荐答案

(未记录)标记在 xcodebuild 中: -UseModernBuildSystem =< value> 。该值可以是 0 NO 以使用旧版(原始)构建系统,或者是 1 YES 来使用新的构建系统。

There is an (as of yet undocumented) flag in xcodebuild: -UseModernBuildSystem=<value>. The value can be either 0 or NO to use the legacy ("original") build system, or 1 or YES to use the new build system.

例如:

xcodebuild -workspace Foo.xcworkspace -scheme Bar -configuration Release -archivePath /path/to/Foo.xcarchive clean archive -UseModernBuildSystem=NO

-UseNewBuildSystem =< value> 似乎也可以正常工作;该标志是Xcode 9中引入的,但是我怀疑 UseModernBuildSystem 将成为该标志的官方标志。)

(-UseNewBuildSystem=<value> seems to work as well; this flags was introduced in Xcode 9 but I suspect UseModernBuildSystem is going to be the "official" flag for this.)

这篇关于如何在Xcode 10的`xcodebuild`中使用旧版构建系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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