在Xcode中從動態(tài)庫剝離不需要的架構自從iOS 8發(fā)布以來,開發(fā)人員已經(jīng)能夠利用動態(tài)庫對iOS開發(fā)的好處。對于一般開發(fā),為所有需要的架構設置一個單一的動態(tài)庫是非常好的,所以您可以在所有設備和iOS模擬器上運行,而無需更改任何東西。然而,這種方法有一個缺點 - 因為它們在運行時鏈接,當一個動態(tài)庫被單獨編譯到最終應用程序時,不可能知道實際需要哪些架構。因此,Xcode將在編譯時將整個事物復制到應用程序包中。除了浪費的磁盤空間,理論上沒有真正的缺點。但是實際上,iTunes Connect不喜歡我們添加未使用的二進制切片:這時候,打包上傳Appstore會報如下錯誤: ![]() 那么,我們?nèi)绾谓鉀Q這個問題呢? ![]() 在Build Phases中加入run script。在里面添加Shell腳本,
該腳本將查看您構建的應用程序的Frameworks文件夾,并確保只有您正在構建的架構存在于每個框架中。
可解決環(huán)信HyphenateLite.framework上傳appstore報錯: 在使用環(huán)信HyphenateLite.framework時,出現(xiàn)如下錯誤: Code1:ERROR ITMS-90087: "Unsupported Architectures. The executable for MM_FESCO.app/Frameworks/HyphenateLite.framework contains unsupported architectures '[x86_64, i386]'." The executable for MM_FESCO.app/Frameworks/HyphenateLite.framework contains unsupported architectures '[x86_64, i386]'." The app binary at 'MM_FESCO.app/Frameworks/HyphenateLite.framework/HyphenateLite' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version." The app binary at 'MM_FESCO.app/Frameworks/HyphenateLite.framework/HyphenateLite' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version." The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker." is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information refer to Technical Q&A QA1788 - Building a Position Independent Executable in the iOS Developer Library." is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information refer to Technical Q&A QA1788 - Building a Position Independent Executable in the iOS Developer Library." |
|