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

Fastlane上传TestFlight包报错:需指定-asc_provider参数

问题

使用Fastlane创建iOS TestFlight构建包,此前运行正常且未修改Fastlane配置,现在上传至Apple App Store时出现报错,报错信息如下:

[21:50:01]: Transporter transfer failed.
[21:50:01]: 
[21:50:01]: Cannot obtain the content provider public id. Please specify a provider short name using the -asc_provider option.

[21:50:02]: Cannot obtain the content provider public id. Please specify a provider short name using the -asc_provider option.
Return status of iTunes Transporter was 1: Cannot obtain the content provider public id. Please specify a provider short name using the -asc_provider option.
The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.

[21:50:02]: Error uploading ipa file: 


[21:50:02]: fastlane finished with errors

[!] Error uploading ipa file:
解决方法

该错误因你的Apple ID关联多个App Store Connect提供商,Fastlane无法自动识别目标提供商导致,按以下步骤解决:

  • 获取提供商短名称
    打开终端,执行以下命令(替换为你的Apple ID邮箱):

    fastlane spaceship provider -u your_apple_id@example.com
    

    命令执行后会列出账号关联的所有提供商,记录对应的Short Name。

  • 在Fastlane配置中固定指定
    打开Fastfile,找到upload_to_testflight或deliver动作,添加asc_provider参数并填入刚才获取的短名称:

    upload_to_testflight(
      asc_provider: "你的提供商短名称"
    )
    

    若使用deliver动作则改为:

    deliver(
      asc_provider: "你的提供商短名称"
    )
    
  • 单次运行临时指定
    若不想修改配置文件,可在运行fastlane命令时通过参数直接指定:

    fastlane 你的lane名称 asc_provider:"你的提供商短名称"
    

内容的提问来源于stack exchange,提问作者Haresh Ghatala

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.15 17:10:25