如何获取iTunes连接团队ID和团队名称?

Kar*_*ban 34 itunesconnect ios fastlane

我写下来的Appfilefastlane,我的问题是我已经具备了team_nameteam_id苹果开发中心,但我不能让iTunes Connect ID/ itc_team_id.我和不同的团队合作.我怎么得到它?任何指南都会很棒.谢谢

Jor*_*ndo 74

您可以直接从Spaceship获取它(参见"登录"部分)(https://github.com/fastlane/fastlane/blob/master/spaceship/docs/iTunesConnect.md)

基本上只需在shell中键入以下内容:

$ irb
irb> require "spaceship"
irb> Spaceship::Tunes.login("iTunesConnect_username", "iTunesConnect_password")
irb> Spaceship::Tunes.select_team
Run Code Online (Sandbox Code Playgroud)

您将看到您的帐户所属的团队列表,以及该团队的数字表示.

  • 在2019年就像魅力一样!谢谢! (5认同)
  • 2021年还在工作 (2认同)

Kra*_*eFx 12

而不是尝试手动获取它,只需运行fastlane而不指定团队ID.一旦需要选择,fastlane将列出所有可用的iTunes Connect团队及其ID,然后您可以存储此号码.

  • 例如,如果您使用fastlane delivery,请执行"fastlane deliver -u <account_user_name>",它将显示iTunes Connect的团队ID列表 (6认同)

sul*_*rza 10

最简单的方法

fastlane produce

如果你在多个团队中,它会显示

[16:36:43]: Your Apple ID Username: youremail@icloud.com
Available session is not valid any more. Continuing with normal login.
Multiple teams found on the Developer Portal, please enter the number of the team you want to use: 
1) 89******8K "B******d Incorporated" (Company/Organization)
2) B8******ZP "Sultanmyrza Kasymbekov" (Individual)
Run Code Online (Sandbox Code Playgroud)

你应该选择一个,之后它会像你一样

[16:38:19]: [DevCenter] App 'co.brainfood.brainfood' already exists, nothing to do on the Dev Center
Available session is not valid any more. Continuing with normal login.
Multiple App Store Connect teams found, please enter the number of the team you want to use: 
Note: to automatically choose the team, provide either the App Store Connect Team ID, or the Team Name in your fastlane/Appfile:
Alternatively you can pass the team name or team ID using the `FASTLANE_ITC_TEAM_ID` or `FASTLANE_ITC_TEAM_NAME` environment variable

  itc_team_id "1******12"

or

  itc_team_name "B******d Incorporated"

1) "B******d Incorporated" (1*******2)
2) "Sultanmyrza Kasymbekov" (1******7)
Run Code Online (Sandbox Code Playgroud)


Dat*_*tel 8

将以下通道代码添加到您的 fastlaneFastfile并运行fastlane getTeamNames

 lane :getTeamNames do
  require "spaceship" 
  clientTunes = Spaceship::Tunes.login("{appleID}", "{applePassword}")
  client = Spaceship::Portal.login("{appleID}", "{applePassword}")

  strClientTunes = "" 
  clientTunes.teams.each do |team|
      UI.message "#{team['contentProvider']['name']} (#{team['contentProvider']['contentProviderId']})"
      strClientTunes << "#{team['contentProvider']['name']} (#{team['contentProvider']['contentProviderId']})||"
  end 
  File.write('ItunesTeamNames', strClientTunes[0..-3])

  strDevPortal = "" 
  client.teams.each do |team|
      UI.message "#{team['name']} (#{team['teamId']})"
      strDevPortal << "#{team['name']} (#{team['teamId']})||"
  end
  File.write('DevTeamNames', strDevPortal[0..-3])

end
Run Code Online (Sandbox Code Playgroud)

获得的iTunes从连接组ID和球队名称ItunesTeamNamesDevTeamNames文件夹FASTLANE在

注意:-用您的苹果 ID 和密码替换{appleID}{applePassword}


Mar*_*nte 8

如果您不在Mac上,则可以通过iTunes connect网站获得它。

来源:https : //github.com/fastlane/fastlane/issues/4301#issuecomment-253461017

  • 这是最好的答案;) (9认同)
  • 2021 年有效。应该只将 itunes store connect 重命名为 appstore connect,以便您及时了解 Apple 的命名。 (2认同)

Man*_*ger 5

我正在使用 fastlane,一次登录即可管理多个帐户。

  • 要获取所有dev_team_id(开发者门户团队 ID),我运行以下命令:
    fastlane match
Run Code Online (Sandbox Code Playgroud)
  • 要获取所有c_team_id(App Store Connect 团队 ID),我运行以下命令:
    fastlane deliver
Run Code Online (Sandbox Code Playgroud)