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

React Native iOS归档上传报错:CFBundleExecutable Key异常求助

解决 React Native iOS 归档上传时的 Unexpected CFBundleExecutable Key 错误

报错信息

Unexpected CFBundleExecutable Key. The bundle at 'Payload/dummy.app/AccessibilityResources.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: 243b1aea-2032-48d3-8b0b-7a13b4c2f5e9

环境配置

"react-native":  "0.71.2",
"macOS": "12.5",
"IOS target", 
"xcode-version": "14.1 (14B47b)"

已尝试苹果开发者论坛相关方案但无效,以下是针对性解决步骤:

基础修复步骤

  • 定位项目中的 AccessibilityResources.bundle 文件,通常在 ios/Pods 目录下的第三方依赖或项目自有资源中
  • 打开该 bundle 内的 Info.plist 文件
  • 删除 CFBundleExecutable 字段
  • 添加 CFBundlePackageType 键,设置值为 BNDL
  • 执行 Cmd+Shift+K 清理 Xcode 缓存,重新归档上传

进阶修复方案(基础步骤无效时)

  • 排查引入该问题 bundle 的第三方依赖,尝试升级依赖至最新版本后重新编译
  • 在项目 ios/Podfile 中添加自动修正脚本,执行 pod install 后重新编译:
    post_install do |installer|
      installer.pods_project.targets.each do |target|
        # 替换成实际包含问题bundle的依赖库名称
        if target.name == 'TargetName'
          bundle_path = target.product_reference.real_path
          plist_path = "#{bundle_path}/Info.plist"
          system("defaults delete #{plist_path} CFBundleExecutable")
          system("defaults write #{plist_path} CFBundlePackageType BNDL")
        end
      end
    end
    

内容的提问来源于stack exchange,提问作者Nernay Kumar

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.20 05:42:45