You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MacOS15+Xcode16上传Test Flight报错:hermes含bitcode致验证失败

解决Xcode16上传TestFlight时Hermes框架包含Bitcode的验证错误

问题核心

在MacOS 15、Xcode 16环境下,应用构建与归档正常,但上传TestFlight时触发Asset validation failed错误,原因是hermes.framework的可执行文件包含Bitcode。

解决方案

1. 全局关闭项目Bitcode设置

  • 打开Xcode,进入项目根目录的Build Settings,搜索Enable Bitcode,设置为NO
  • 切换到对应Target的Build Settings,同样将Enable Bitcode设为NO
  • 确保所有关联Target(包括扩展、依赖库)的该选项都已关闭

2. 针对CocoaPods集成的Hermes

如果通过CocoaPods引入Hermes,在Podfile中添加以下配置强制关闭其Bitcode:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'hermes-engine'
      target.build_configurations.each do |config|
        config.build_settings['ENABLE_BITCODE'] = 'NO'
      end
    end
  end
end

执行pod install重新加载依赖后,清理项目并重新构建。

3. 手动编译Hermes(非CocoaPods场景)

若手动集成Hermes框架,重新编译时关闭Bitcode选项:

# 进入Hermes源码目录,执行编译配置
cmake -DCMAKE_BUILD_TYPE=Release -DHERMES_ENABLE_BITCODE=OFF ..
# 执行构建
make install

替换项目中原有的Hermes框架后重新归档。

4. 验证Bitcode是否已移除

使用otool命令检查处理后的Hermes可执行文件:

otool -l 你的App路径/Frameworks/hermes.framework/hermes | grep __LLVM

若没有任何输出,说明Bitcode已成功移除,此时可重新尝试上传TestFlight。

5. 清理缓存并重新归档

  • 执行Cmd+Shift+K清理项目编译缓存
  • 打开Xcode Organizer,删除之前生成的归档文件
  • 重新构建、归档后再上传至TestFlight

内容的提问来源于stack exchange,提问作者Engr.Aftab Ufaq

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.18 01:22:26