如何将旧版构建系统与 Xcode 10 的“xcodebuild"一起使用?

编程入门 行业动态 更新时间:2024-10-27 16:39:43
本文介绍了如何将旧版构建系统与 Xcode 10 的“xcodebuild"一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想使用 Xcode 10 的新构建系统进行开发,但由于生成的 xcarchive 存在问题,因此我们在持续集成系统中的构建失败:Info.plistxcarchive 中的 缺少 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"一起使用?

本文发布于:2023-11-08 09:37:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1569022.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何将   旧版   系统   Xcode   xcodebuild

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!