Bitcode是什么,如何配置codeblocks

关注微信公众号: PMvideo
Bitcode是什么,如何配置?
今天在一个麦子学院上看到一篇关于第三方库不包含bitcode就会报错的文章,感觉剖析得很详细,分享出来,希望可以对iOS初入门者有所帮助。下面我们就一起来看看吧。
用Xcode 7 beta 3在真机(iOS 8.3)上运行一下工程,结果发现工程编译不过。看了下问题,报的是以下错误:
ld: ‘/Users/**/Framework/SDKs/PolymerPay/Library/mobStat/lib**SDK.a(**ForSDK.o)’ 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
得到的信息是引入的一个第三方库不包含bitcode。
Bitcode是什么?
查阅了一下官方文档,在 App Distribution Guide – App Thinning (iOS, watchOS) 一节中,找到了下面这样一个定义:
Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new 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 to the 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 bit executables as necessary.
当提交程序到App store上时,Xcode会将程序编译为一个中间表现形式(bitcode)。然后App store会再将这个botcode编译为可执行的64位或32位程序。
再看看这两段描述,都是放在App Thinning(App瘦身)一节中,可以看出其与包的优化有关了。
Bitcode配置
在上面的错误提示中,提到了如何处理我们遇到的问题:
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE www.maiziedu.com), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
要么让第三方库支持,要么关闭target的bitcode选项。
实际上,在Xcode 7中,我们新建一个iOS程序时,bitcode选项默认是设置为YES的。我们可以在”Build Settings”-&”Enable Bitcode”选项中看到这个设置。不过,我们现在需要考虑的是三个平台:iOS,Mac OS,watchOS。
对于iOS,bitcode是可选的;对于watchOS,bitcode是必须的;而Mac OS是不支持bitcode。
所以,如果我们的工程需要支持bitcode,则必要要求所有引入的第三方库都支持bitcode。
通过本文对bitcode的概念及配置情况的简要介绍,希望iOS开发人员在工程运行中遇到类似的情况,可以根据上文的介绍更有效的找到原因并及时处理。
0条评论或问题
笔记社区是一个面向中高端IT开发者、程序员的知识共享社区,通过网络抓取与文章分类总结,由专家为用户提供高质量的专题文章系列。
原文链接:http://blog.csdn.net/qxuewei/article/details/
声明:所有文章资源均从网络抓取,如果侵犯到您的著作权,请联系删除文章。联系方式请关注微信公众号PMvideo【锤子视频-程序员喜欢的短视频】,或者加笔记社区开发者交流群 。
今日签到3人
关注微信公众号:PMvideoBitcode是什么,如何配置- _星空生活网
你现在浏览的是: & > &
Bitcode是什么,如何配置
Bitcode是什么,如何配置
code blocks 定义一个类 是不是还需要什么设置啊 :
类定义完之后的大括号后面有个分号; class Circle{ public: ... privat...
codeblocks编译有错误的代码,怎么设置让它显示错误是什么。 :
F2或者view -& log
win10 codeblocks怎么配置文件 :
配置主题 1 首先下载主题包, 2 找到Codeblocks配置文件所在地(下面是我的配置文件所在地...
怎么给codeblock配置编译器 :
使用内建 specs 目标:i686-linux-gnu 配置:../src/configure -...
codeblock写win32程序还需要配置什么吗 :
Code::Blocks的发行版版本号就是它的发行年月,所以8.02版,就是08年2月份发布的,其实...
Vscode怎么配置java调试环境 :
http://blog.csdn.net/c_duoduo/article/details/5163...
如何配置codeblocks+opencv :
codeblocks+opencv的配置: 1、 相关文件位置 输入命令~# pkg-config ...
LBL,SVCTAG/EXPRESSCODE,LATC这配置是什么意思? :
LBL,SVCTAG/EXPRESSCODE,LATC -标签,服务编号/快速服务编号标签
如何在mac的visual studio code上配置c语言 :
Mac OS中使用VScode配置C语言开发环境,图文教程,请参考 http://www.cnblo...
codeblocks环境变量怎样配置 :
setting -- compiler and debugger 切换到Toolchain exec...Bitcode是什么,如何配置_百度知道
Bitcode是什么,如何配置
我有更好的答案
bitcode编译程序种间形式代码包含bitcode配置程序App store编译链接bitcode允许苹期重新优化程序二进制文件需要重新提交新版本App store bitcode选项默认设置YES我Build Settings-&Enable Bitcod
采纳率:72%
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。

我要回帖

更多关于 vscode 如何配置插件 的文章

 

随机推荐