上传ipa 的时候会遇到:
Unexpected CFBundleExecutable Key. The bundle at 'Payload/ZKYA-iOS.app/TMicro.bundle' 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. (ID: 881dc4e1-fad4-4f15-a159-85e60e4f7dd7)
解决办法:
- 如果是本地独立生成的bundle ,那么手动在bundle 里面的info.plist 里面手动删除CFBundleExecutable
- 如果是target 创建的bundle ,那么在bundle 相应的设置里面把Product Module Name 设置为空,默认是bundle 的名字
- 另外对也可以加个构建脚本,但是好像有时候会失效,所以第二种办法更推荐
if [ -f "$plist" ]; then
/usr/libexec/PlistBuddy -c "Delete :CFBundleExecutable" "$plist" || true
fi
- 手动删除plist 配置,在bundletartet 的info 配置选项,手动删除CFBundleExecutable,如下图
- 如果上面的都不能解决问题,那么创建一个自定义的plist ,target 里面设置不让自动产生plist ,把自定义的plist 路径填到plist 的路径里面
网友评论