iOS开发 创建Bundle及注意事项

一、bundle上架AppStore失败解决办法

报错:
Asset validation failed (90535)
Unexpected CFBundleExecutable Key. The bundle at 'xxx' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue.

是因为Info.plist中存在Executable file,删掉即可。

二、创建Bundle

方式一:

创建文件夹TestBundle,并改名为TestBundle.bundle。然后再把资源文件放入该Bundle就可以了。

方式二:

使用此方式的目的:可通过Xcode管理资源文件,且可多Target管理。

1.创建Bundle

image.png

2.设置Base SDK

Build Settings中修改Base SDKiOS

image.png

3.设置Versioning System

Build Settings中修改Versioning SystemNone
此处需要特别注意,一定要确认,如果设置不对,会导致Bundle中包含了可执行文件,会导致上架AppStore被拒。

image.png

4.设置Installation Directory

Build Settings中删除Installation Directory后面对应的路径。

image.png

5.设置Code Signing Identity

Build Settings中删除Code Signing Identity后面对应的路径。(先选择Other,再删除即可)

image.png

6.设置iOS Deployment Target

Build Settings中设置iOS Deployment TargetiOS9.0
一般情况下设置为最小的即可。

image.png

7.设置Skip Install

Build Settings中设置Skip InstallNO

image.png

8.设置COMBINE_HIDPI_IMAGES

Build Settings中设置COMBINE_HIDPI_IMAGESNO

image.png

9.删除Executable file

Info.plist中删除Executable file

image.png

10.确认Bundle OS Type code

确认生成的Bundle的Info.plistBundle OS Type code值是否为BNDL,如不是,手动修改为BNDL

image.png

image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容