xcodebuild 7.3 无法启用位码 [英] xcodebuild 7.3 can't enable bitcode

查看:22
本文介绍了xcodebuild 7.3 无法启用位码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 iOS 开发一个嵌入式框架.为了制作一个通用胖子(带有模拟器和设备切片),我创建了一个聚合目标,其中包含一个脚本,该脚本使用 xcodebuildlipo 命令来生成它,就像很多人一样可以.

I'm developing an embbeded framework for iOS. In order to make an universal fat (with simulator and device slices), I created an aggregate target with a script that uses xcodebuild and lipo commands to generate it, as many people does.

在 XCode 7.x 中,我必须使用 BITCODE_GENERATION_MODE=bitcode 添加用户定义的设置才能启用它,但自上一个 XCode 7.3 版本以来,这已停止工作.

With XCode 7.x I had to add an user-defined settings with BITCODE_GENERATION_MODE=bitcode in order to enable it, but this has stop working since the last XCode 7.3 release.

我已经尝试了我在互联网上找到的所有内容,例如添加 OTHER_CFLAGS="-fembed-bitcode",但一切都和以前一样......

I've tried everything I found in the internet like add OTHER_CFLAGS="-fembed-bitcode", but anything works as before...

我在构建日志中看到了这个:

I have seen this in the build log:

ENABLE_BITCODE 始终为 NO,无论我做什么.

ENABLE_BITCODE is always NO, no matter I do.

自 XCode 7.3 以来,是否有人尝试使用 xcodebuild 命令创建一个启用位码的通用胖框架?

Has anybody tried to create an universal fat framework with bitcode enabled using xcodebuild command since XCode 7.3?

推荐答案

我昨天遇到了类似的问题.经过一番调查,从任何 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.

这篇关于xcodebuild 7.3 无法启用位码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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