问题描述
从Xcode 7开始,第三方框架应支持。我们也可以通过在构建设置中将ENABLE_BITCODE设置为NO来禁用BITCODE。但是我不想关闭它,而是想将我所有的框架都转换为BITCODE兼容。
From Xcode 7 it became one of the common problem that third party frameworks should support Bitcode. We can also disable the BITCODE by setting ENABLE_BITCODE to NO in Build settings. But i do not want to turn it off, instead i want to convert all my frameworks to BITCODE compatible.
因此,除了编译外,如何检查框架是否与BITCODE兼容Xcode中的框架。有时Xcode会为一个框架提供BITCODE兼容性错误,即使其他框架没有BITCODE支持,也会离开框架。
So how to check if a framework is BITCODE compatible apart from compiling the framework in Xcode. Sometimes Xcode give error for BITCODE compatibility for one framework leaving the others even though they don't have BITCODE support.
是否有任何工具/命令行检查?
Is there any tool/command line check?
推荐答案
来自讨论中,用户和建议使用命令行工具 otool
和 grep
检查是否存在位码部分。
From this Apple Developers Forum discussion, user dshirley and bwilson suggest using command line tools otool
and grep
to check if bitcode sections exist.
$ otool -l libName.o | grep __LLVM
或
$ otool -l MyFramework.framework/Versions/A/MyFramework | grep __LLVM
运行以上命令,如果库中包含位码,您将看到 segname __LLVM
输出。
Running the above command, if the library contains bitcode you will see segname __LLVM
output.
这篇关于如何检查Xcode7是否支持BITCODE框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!