大家都知道,xcode7問世之后可以不通過申請(qǐng)測(cè)試證書等一系列東西,來達(dá)到真機(jī)測(cè)試,然后會(huì)遇到一個(gè)問題,xcode在真機(jī)測(cè)試中會(huì)報(bào)錯(cuò),
錯(cuò)誤大概如上.
下面我說一下原因,從錯(cuò)誤中看,是因?yàn)橐粋€(gè)第三方庫(kù)類報(bào)錯(cuò)了,而且還與bitcode有關(guān),那么我們就去看一下bitcode
發(fā)現(xiàn)xcode默認(rèn)設(shè)置bidcode為YES
果斷將bit code修改為NO,運(yùn)行發(fā)現(xiàn) ,可以進(jìn)行真機(jī)測(cè)試了.
原因是什么呢?原來在導(dǎo)入的第三方庫(kù)中又不支持bitcode的,所以你只能修改第三方庫(kù)支持bitcode或者關(guān)掉bitcode,當(dāng)然還是關(guān)掉比較快.
而bit code呢
好吧 我們?nèi)ゲ樵円幌翧PI 吧,終于找到了
在 Distribution Guide–App Thinning (iOS, watchOS) 一節(jié)中碰酝,找到了:
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配置的程序?qū)?huì)在App store上被編譯和鏈接绅这。bitcode允許蘋果在后期重新優(yōu)化程序的二進(jìn)制文件屋彪,而不需要重新提交一個(gè)新的版本到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.
當(dāng)提交程序到App store上時(shí)喇澡,Xcode會(huì)將程序編譯為一個(gè)中間表現(xiàn)形式(bitcode)钦铺。然后App store會(huì)再將這個(gè)botcode編譯為可執(zhí)行的64位或32位程序。
可到這里,我還是不太明白是神馬意思,通過查閱相關(guān)資料,得出的結(jié)論是 這個(gè)東西應(yīng)該和包得優(yōu)化有關(guān)芦疏。
最后總結(jié)一下,解決問題的辦法就是關(guān)掉bitcode 簡(jiǎn)單暴力 哈哈