前情提要
在App Store Connect中提交应用审核时,提示没有构建版本,因此汇总该教程,仅解决从Xcode上传构建版本至App Store Connect。
环境变量
- Mac Sonoma 14.5
- Xcode Version 15.4 (15F31d)
操作流程
配置项目设置
1、首先,打开Xcode项目,点击左侧顶部项目名称,点击TARGETS -> General -> Identity -> Bundle Identifier,配置正确的Bundle Identifier内容。

2、然后点击General旁边的Signing & Capabilities,检查Team是否正确以及勾选Automatically manage signing。

设置构建配置
1、点击中间面板顶部的图标,在列表中选择“Edit Scheme…”。

2、然后,我们切换到Run -> Info菜单,将Build Configuration设置为Release。

归档应用
1、点击中间面板顶部的运行设备,在运行设置中选择Any iOS Device (arm64)。

2、点击Xcode菜单栏中的Product -> Archive按钮

3、在弹出的归档窗口中,在列表里选择刚刚进行归档的应用,点击“Distribute App”进行分发。

4、我们可以在这里选择分发的类型 App Store Connect,点击分发按钮。

然后,经过几分钟的等待,我们归档的应用就上传到App Store Connect上了。


后续操作(App Store Connect)
我们打开App Store Connect,点击构建版本 -> 添加构建版本,勾选我们通过Xcode归档的应用,点击完成按钮。

最后,我们通过Xcode归档的应用就传上来了。

任务完成。
注意:如果这里没有显示的话,可能需要等待App Store Connect的同步,大约5分钟后,这里就是同步的状态了。
踩坑问题
归档时提示:Invalid Run Destination The current scheme doesn’t have a run destination that can produce an archive.
这个问题是Scheme配置不正确,重新走一遍前面设置构建配置的操作,另外我遇到这个问题时,是因为Scheme选择器没有选择有效的设备,我选择了错误的真机进行构建,所以报错。
这里应该选择:Any iOS Device (arm64)
