禁用Xcode 7的项目和cocoapods依赖项的位码? [英] Disable bitcode for project and cocoapods dependencies with Xcode 7?
问题描述
如何为项目和cocoapod依赖项禁用位码?这是尝试使用Xcode 7运行项目时遇到的错误。
How can you disable bitcode for your project and cocoapod dependencies? Here is the error I get when trying to run my project with Xcode 7.
不包含位码。您必须在启用位码(Xcode设置ENABLE_BITCODE)的情况下重建它,从供应商处获取更新的库,或禁用此目标的位码。对于体系结构arm64
does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
编辑:最初仅将其禁用为一个目标。一旦我禁用了所有它们,我就能够成功构建。
Originally only disabled it for one of the targets. Once I disabled all of them and I was able to build successfully.
推荐答案
以一种不会设置此设置的方式每次执行 pod安装
都会被覆盖,您可以将其添加到 Podfile
To set this setting in a way that doesn't get overridden each time you do a pod install
you can add this to your Podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
这篇关于禁用Xcode 7的项目和cocoapods依赖项的位码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!