博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
"xxx was built without full bitcode" 编译错误解决
阅读量:4087 次
发布时间:2019-05-25

本文共 1627 字,大约阅读时间需要 5 分钟。

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”选项中看到这个设置。不过,我们现在需要考虑的是三个平台:iOS,Mac OS,watchOS。

对于iOS,bitcode是可选的;对于watchOS,bitcode是必须的;而Mac OS是不支持bitcode

解决办法 : BuildSettings 里设置 Enable Bitcode为NO即可, 如下图:

你可能感兴趣的文章
XML工具代码:SAX从String字符串XML内获取指定节点或属性的值
查看>>
时间日期:获取两个日期相差几天
查看>>
责任链模式 Chain of Responsibility
查看>>
高并发与大数据解决方案概述
查看>>
解决SimpleDateFormat线程安全问题NumberFormatException: multiple points
查看>>
MySQL数据库存储引擎简介
查看>>
处理Maven本地仓库.lastUpdated文件
查看>>
Kafka | 请求是怎么被处理的?
查看>>
Java并发编程1-线程池
查看>>
CentOS7,玩转samba服务,基于身份验证的共享
查看>>
计算机网络-网络协议模型
查看>>
计算机网络-OSI各层概述
查看>>
Java--String/StringBuffer/StringBuilder区别
查看>>
mySQL--深入理解事务隔离级别
查看>>
分布式之redis复习精讲
查看>>
数据结构与算法7-栈
查看>>
线性数据结构学习笔记
查看>>
数据结构与算法10-冒泡排序、插入排序、选择排序
查看>>
数据结构与算法14-跳表
查看>>
Java并发编程 | 一不小心就死锁了,怎么办?
查看>>