iOS 9.0更新碰到:第三方庫不包含bitcode
運行錯誤提示 某一個第三方庫不包含bitcode乐严? bitcode?是什么,以前沒有注意過衣摩。
查閱了一下官方文檔昂验,在App
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是一個中級representationof編譯程序艾扮。應(yīng)用程序上傳iTunes Connect包含bitcodewill編譯和鏈接在App Store既琴。包括bitcode將來allowApple優(yōu)化你的應(yīng)用程序二進制而不需要重新提交版本的應(yīng)用程序商店。
而在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.
Bitcode甫恩。當你檔案提交到應(yīng)用程序商店,Xcode將編譯你的應(yīng)用程序到一個中間表示。App Store將編譯bitcode分成64或32 bitexecutables是必要的酌予。
再看看這兩段描述磺箕,都是放在App Thinning(App瘦身)一節(jié)中,可以看出其與包的優(yōu)化有關(guān)了抛虫。
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
你必須重建它啟用了bitcode(Xcode設(shè)置ENABLE_BITCODE),從供應(yīng)商獲得一個更新的庫,ordisable bitcode這個目標。建筑arm64
現(xiàn)在有兩種解決方式:
1.讓第三方庫支持建椰,
2.關(guān)閉target的bitcode選項击困。我現(xiàn)在所使用的方法就是將bitcode關(guān)閉
在Xcode 7中,我們新建一個iOS程序時广凸,bitcode選項默認是設(shè)置為YES的阅茶。我們可以在”Build Settings”->”Enable Bitcode”選項中看到這個設(shè)置
將Enable Bitcode默認的YES 選項改成NO 就行了希望對遇到類似問題朋友有所幫助