且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

xcodebuild 7.3 无法启用位码

更新时间:2023-09-11 21:35:46

我昨天遇到了类似的问题.经过一番调查,从任何 Xcode 目标中的运行脚本"构建阶段运行 xcodebuild 时出现的问题似乎与要使用的工具链的显式规范有关,通过 ENV 变量完成工具链.

I ran into a similar issue yesterday. After some investigation, the problem, that appears when running xcodebuild from a "Run Script" build phase in any Xcode target, seems related with the explicit specification of the toolchain to be used, done with the ENV variable TOOLCHAINS.

因此,在 Apple 发布 Xcode 7.3 的固定版本之前,您可以尝试在脚本开头添加以下命令:

Therefore, until Apple releases a fixed version of Xcode 7.3, you can try to add the following command at the beginning of your script:

# Xcode 7.3 位码生成问题的解决方法取消设置工具链

这应该是无害的,因为当您从命令行运行 xcodebuild 时,默认情况下未设置此 env 变量,并且此解决方法在我的情况下工作得很好.

This should be harmless, as this env variable is not set by default when you run xcodebuild from the command line, and this workaround works just fine in my case.