上传Appstore报错ERROR ITMS-90171

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正常,成功解决!

猜你喜欢

转载自www.cnblogs.com/xbios/p/12926895.html