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

使用Transporter上传Electron应用至Mac App Store时元数据无效问题

问题描述

使用Transporter将Electron应用上传至Mac App Store时,出现以下资产验证错误:

Asset validation failed (90230)
Invalid product archive metadata. Error in keyPath [product-metadata.product-identifier]. Please re-build your archive with an up-to-date version of Xcode, and submit again. (ID: 42de3de7-0fab-4f22-ab01-06195842aaaa)

Asset validation failed (90230)
Invalid product archive metadata. Error in keyPath [product-metadata.product-version]. Please re-build your archive with an up-to-date version of Xcode, and submit again. (ID: 63470cc8-c192-4500-a51d-ded305887f88)

当前使用的环境:

  • Electron Forge 7.3.1
  • Electron 29.1.6(已更新至最新版)
  • Xcode 15.3(已更新至最新版)

已完成的操作:通过packagerConfig.extendInfo覆盖Info.plist中的以下字段,且已确认最终包中包含这些配置:

<key>DTPlatformVersion</key>
  <string>14.4</string>
  <key>DTSDKBuild</key>
  <string>23E208</string>
  <key>DTXcode</key>
  <string>1530</string>
  <key>DTXcodeBuild</key>
  <string>15E204a</string>

提问:product-metadata定义在哪里?该如何修复此问题?


解决方案

一、product-metadata的定义位置

product-metadata是Xcode构建归档文件(.xcarchive)时自动生成的内部元数据,并非直接在App的Info.plist中定义。它主要存储在归档包内的Info.plist(路径:.xcarchive/Info.plist)以及ProductInfo.plist等文件中,部分内容关联Apple Developer后台配置的App信息。

二、具体修复步骤

  • 核对配置一致性
    确保Electron Forge配置中的packagerConfig.appBundleId与Apple Developer后台的App Bundle ID完全一致(大小写、后缀均不能出错);同时确认packagerConfig.appVersion或项目根目录package.json里的version字段,与App Store Connect中创建的版本号完全匹配,这两个值分别对应错误中的product-identifier和product-version。
  • 改用Xcode重新归档
    1. 先通过Electron Forge生成App包:执行npm run make
    2. 打开Xcode,将生成的.app文件拖入Xcode界面
    3. 选择对应的开发者账号,执行Product > Archive完成归档
    4. 归档完成后,可直接通过Xcode的Distribute App上传,或导出归档后用Transporter提交
  • 清理构建缓存
    1. 删除Electron Forge缓存:执行rm -rf ~/.electron-forge
    2. 删除Xcode的Derived Data:打开Xcode的Xcode > Settings > Locations,点击Derived Data旁的箭头,删除对应项目的缓存文件夹
    3. 重新执行打包和归档流程
  • 检查Xcode SDK与签名配置
    1. 打开Xcode的Xcode > Preferences > Components,确认已安装最新的macOS 14.4 SDK
    2. 在Electron Forge的packagerConfig.osxSign中,确保配置了正确的identity、provisioningProfile路径,且开启hardenedRuntime: true

内容的提问来源于stack exchange,提问作者Ricky Mo

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.26 19:59:57