1. 程式人生 > >【解決方法】You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE)

【解決方法】You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE)

今天把xcode升級到7.0了,除了swift語法的一些問題,還有幾個問題比較麻煩,其中一個就是包含標題的一個錯誤提示。

開發環境:Xcode 7.0
開發語言:swift(引入了第三方的oc庫)
出現場景:

正常除錯是沒有問題的,但是在Archive的時候,報出了這個錯誤。

問題詳情:

(null): URGENT: all bitcode will be dropped because ‘xxxx’ was built without 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. Note: This will be an error in the future.

問題分析:

從上述的錯誤中應該可以看出,這是因為一個第三方的庫不相容,我的工程中開啟了 ENABLE_BITCODE (應該是升級之後自動轉換的),而這個第三方的庫在編譯的時候沒有 enable bitcode,所以導致上訴問題。

解決方法:

應該是有兩種吧,一種就是換成 enable bitcode 的第三方庫,再有一種就是將工程的 ENABLE_BITCODE 設定為 false 就可以了。

因為我這裡不太方便換庫,所以,就把工程的設定給改了一下。

具體操作方法如下:

操作方法

上面解決方法是把工程的設定給改了,但是改了之後有什麼影響現在還沒有發現。如果以後發現了會更新本文。