ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'xxx.app/xxx.framework/xxx' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
打包ipa上傳APPstore時碰到這個問題,網上搜了幾種方法,都沒有解決。
第一種:
刪除bundle里的執行文件:找到工程中的xxx.Bundle,右鍵單擊后 選擇 "顯示包內容",找到里面黑色的可執行文件xxx,刪除掉,然后找到里面的info.plist文件 ,刪除掉Executable file 字段,重新打包,上傳應用商店就可以了。
我項目里的framework,info.plist文件都沒有,解決失敗。
第二種:
This error occurs when the Apptentive static library iscopied to the app bundle.
libApptentiveConnect.a should be added to the target’sLink Binary with Libraries build phase.
It should not be added to the target’s Copy BundleResources build phase.
stackoverflow也找到答案:
Open the Build Phases tab in the target settings for your project.
Make sure that Flurry.framework is not included under Copy Bundle Resources.
貌似沒看懂,但是得到提示是資源文件引入好像有問題。
然后我就找到對應framework,copy bundle resources,引入方式是取的framework路徑,因為需要引入framework中的nib文件,那應該就是這個原因了。
感覺可能是因為framework中有其他可執行文件也會被引進來導致的問題。
然后接下來的問題,nib資源怎么引入呢?
既然不能直接引入framework,那么我們只引入nib文件。新建一個文件夾,Add Files To "xxx",記住是文件目錄引入,不要實體文件copy。
然后運行正常,打包上傳Appstore正常,成功解決!