bitcode ITMS-90562: Invalid Bundle

原创 2019-12-24

ITMS-90562: Invalid Bundle - The app cannot be processed because options not allowed to be embedded in bitcode are detected in the submission.

近日新版本APP提交至AppStore之后,没多久收到邮件:

ITMS-90562: Invalid Bundle - The app cannot be processed because options not allowed to be embedded in bitcode are detected in the submission. It is likely that you are not building the app with the toolchain provided in Xcode. Rebuild your entire app with the latest GM Xcode and submit the app again.

在这里先吐槽下AppStoreConnect的体验问题:App上传一切顺利的时候还好,当构建失败时,在AppStoreConnect的后台仅能看到“Invalid Bundle”的提示,必须进入Apple ID的邮箱中,才会从苹果的邮件中看到一些可能有用的提示,很不方便。

从邮件中来看,原因可能有:

  • 使用了非官方版本的Xcode或toolchain;
  • 未能完全开启bitcode;

对于第一个可能,需要保证Xcode(toolchain)来自官方,并且不是beta版本,尽量保持Xcode版本足够新。

对于第二个可能,需要全面排查项目的bitcode开启情况(包括依赖的动态库、静态库)。需要注意的是,对于依赖的动态库、静态库来说,仅仅在Build Settings中配置Enable Bitcode为Yes是不够的。动态库(静态库)在build时,clang默认的编译参数是-fembed-bitcode-marker,这里仅仅是做标记,在生成的Mach-O文件中,__LLVM__bundlesection的内容是空的,并没有bitcode的数据。

解决办法是,在build setting中新增一项User-Define Setting,名称为:BITCODE_GENERATION_MODE,推荐配置Debug为marker(对应的编译参数为-fembed-bitcode-marker),Release为bitcode(对应的编译参数为-fembed-bitcode)。

# iOS

相关文章:

分享AppStore审核的一些经验教训
xcodebuild:code signature invalid
iOS安全:使用frida-ios-dump砸壳
iOS 真机和模拟器HTTPS Charles抓包指南
iOS NSURLProtocol详解及使用陷阱

发表留言

您的电子邮箱地址不会被公开,必填项已用*标注。