为了便于进行模块化开发,项目中将某一些部分使用Framework进行开发后再在主程序中进行调用,虽然能够跑通,但开发阶段中没有细究、文件结构比较随意。可是到了提交苹果App Store审核时,却碰到了如下错误:
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'xxx.app/Frameworks/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."
以上的xxx就是自己写的framework,经过研究后发现对于Framework还应该有如下注意事项:
Framework中使用的资源,如图片、strings、storyboard等都需要放在一个bundle中来使用。
在主程序中对使用的framework还应进行如图中的配置,选择 Do not embed。
于是又忙活着改了两天,改过后再提交,验证通过!