关于ios8之后BitCode一词,关于在xcode7(bate3)中报错的解决以及普及

忽然之间,你就会发现,Bitcode什么鬼???这是什么鬼?
服务器

在Apple官方文档中提到了这一段微信

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.app

哈哈,看不懂的话,我帮你有道翻一下!优化


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


翻译出来也是苦涩难懂,大体意思就是bitcode这种东西是编译程序时候,一种用来过渡用的代码形式,就像咱们抛送去服务器的UTF-8代码形式同样的!this


接下来再看一段!spa

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位程序。code


大体意思就是,这个鬼东西就是跟前一段时间app大瘦身有关,自从苹果出手表之后,固然是包作的越小,内存占有越小,耗电耗能越小,最好!因此出来的这个鬼东西比较赞的!orm

Bitcode配置

在上面的错误提示中,提到了如何处理咱们遇到的问题:

You must rebuild it with bitcode enabled(Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, ordisable 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,则必要要求全部引入的第三方库都支持bitcode。

经过本文对bitcode的概念及配置状况的简要介绍,但愿iOS开发人员在工程运行中遇到相似的状况,能够根据上文的介绍更有效的找到缘由并及时处理。

若是个人文档对您有帮助,麻烦关注一下个人公

众微信号,天天学一点,开发更轻松!

相关文章
相关标签/搜索