"xxx was built without full bitcode" 编译错误解决

2016年08月26日 14:01:24 Soooober 阅读数:5071

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sinat_22545219/article/details/52327762

iOS 打包上线 All object files and libraries for bitcode must be generated from...报错:

xxx does not contain bitcode. You must rebuild it with bitcode enabled (Xcodesetting ENABLE_BITCODE), obtain an updated library from the vendor, or disablebitcode for this target. for architecture arm64

纠结半天没搜索到, 包括设置c,c++编译方式都不行, 最终找到原因是第三方库不包含bitcode

那么bitcode 是神马:

Distribution Guide–App Thinning (iOS, watchOS)一节中,找到了下面这样一个定义:

Bitcode is an intermediate representationof a compiled program. Apps you upload to iTunes Connect that contain bitcodewill be compiled and linked on the App Store. Including bitcode will allowApple to re-optimize your app binary in the future without the need to submit anew version of your app to the store.

说的是bitcode是被编译程序的一种中间形式的代码。包含bitcode配置的程序将会在App store上被编译和链接。bitcode允许苹果在后期重新优化程序的二进制文件,而不需要重新提交一个新的版本到App store上。

而在What’s New in Xcode-New Features in Xcode 7中,还有一段如下的描述:

Bitcode. When you archive for submission tothe App Store, Xcode will compile your app into an intermediate representation.The App Store will then compile the bitcode down into the 64 or 32 bitexecutables as necessary.

当提交程序到App store上时,Xcode会将程序编译为一个中间表现形式(bitcode)。然后App store会再将这个botcode编译为可执行的64位或32位程序。 

bitcode内部就是对包进行了一些优化.

错误解决

1:让第三方库支持bitcode 

2:关闭bitcode

1:让第三方库支持bitcode

这种方法显然不大实用, 除非像我一样,碰到这个问题的时候, 联系某xxx第三方库, 客服和我说2个小时左右会上线一个新版本, 将修复此问题, 那么就可以等两个小时用新版本库, 否则还是去用第二种方法吧…

2:关闭bitcode

在Xcode 7中,我们新建一个iOS程序时,bitcode选项默认是设置为YES的。我们可以在”Build Settings”->”Enable Bitcode”选项中看到这个设置


©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 雪如乱絮布满天空 追逐的脚印和雪人 化开每个小孩的笑脸 而我却想让这个深冬 变成春末的夏天 我们可以穿着T恤踩着单...
    Ge3ok阅读 1,625评论 0 0
  • 调暗的屏幕里面没有你 可是你发的每一个字都像星星 一闪一闪就像我跳动的心 没遇到你之前 我只想脱贫 遇到你之后 突...
    蓦然_7b5d阅读 1,486评论 0 0
  • 每个写作者,大概都经历过或者会经历惶惶不安、担心自己的浅薄被看穿的担忧吧。我能不能写出新鲜的故事?我能不能给出全新...
    兰海123阅读 1,292评论 0 1

友情链接更多精彩内容