【问题标题】:How to get iTunes connect Team ID and Team name?如何获取 iTunes 连接团队 ID 和团队名称?
【发布时间】:2017-08-15 02:21:32
【问题描述】:

我正在为 fastlane 写一个 Appfile,我的问题是我已经在 Apple 开发中心拥有 team_nameteam_id,但我无法获得 @ 987654325@/itc_team_id。我正在与不同的团队合作。我如何得到它?任何指南都会很棒。谢谢

【问题讨论】:

    标签: ios app-store-connect fastlane


    【解决方案1】:

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

    【讨论】:

    • 我以前做过,实际上看到了不同团队的itc_team_id,但我正在构建一个NodeJS应用程序,在那里我运行shell命令fastlane。基本上,这是一个自动化构建过程,我不需要通过覆盖 Appfile 并将itc_team_id 放在那里来回答/选择itc_team_id。顺便说一句,你有不错的软件。
    • 例如,如果您使用的是 fastlane Deliver,请执行“fastlane deliver -u ”,它将显示 iTunes Connect 的团队 ID 列表
    • 有什么方法可以在不通过 fastlane 的情况下获取 App Store Connect ID(不是团队 ID)?我有一个运营团队不会运行 cli 来确定构建参数。我已经在互联网上搜索了这个问题的答案.. 无济于事。也许你可以解释一下@KrauseFx?
    【解决方案2】:

    您可以直接从 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
    

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

    【讨论】:

    • 在 2019 年像魅力一样工作!谢谢!
    • 效果很好。谢谢!
    【解决方案3】:

    将以下车道代码添加到您的快车道Fastfile 并运行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
    

    从 fastlane 文件夹中的 ItunesTeamNamesDevTeamNames 文件中获取 iTunes 连接团队 ID 和团队名称

    注意:- 将 {appleID}{applePassword} 替换为您的 Apple ID 和密码

    【讨论】:

      【解决方案4】:

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

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

      【讨论】:

        【解决方案5】:

        如果您不在 Mac 上,可以通过 iTunes Connect 网站获取。

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

        【讨论】:

        • 这是最好的答案;)?
        • Works 2021。应该只将 iTunes Store Connect 重命名为 AppStore Connect,以便您及时了解 Apple 的命名。
        • 这是最好的答案。也适用于 2021 年。特别是如果您启用了 2fa。未来可能 fastlane 和苹果会更容易。
        【解决方案6】:

        最简单的方法

        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)
        

        你应该再次选择一个,然后再选择一个

        [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)
        

        【讨论】:

          【解决方案7】:

          我使用 Spaceship 游乐场。它易于使用,您不需要任何事先的项目设置。如果您在多个团队中工作并且需要定期获取 itc_team_id,您可以让 Playground 继续运行。

          从外壳

          fastlane spaceship
          [✔] ? 
          [16:37:57]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
          Username: you@youremail.com
          Logging into to App Store Connect (you@youremail.com)...
          Successfully logged in to App Store Connect
          
          Logging into the Developer Portal (you@youremail.com)...
          Successfully logged in to the Developer Portal
          
          ---------------------------------------
          | Welcome to the spaceship playground |
          ---------------------------------------
          
          Enter docs to open up the documentation
          Enter exit to exit the spaceship playground
          Enter _ to access the return value of the last executed command
          
          Just enter the commands and confirm with Enter
          [1] pry(#<Spaceship::Playground>)> Spaceship::Tunes.select_team
          

          注意上面的 select_team 调用。它将显示您所在团队的列表以及 itc_team_id

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 1970-01-01
            • 2014-11-12
            • 2014-11-19
            • 2017-02-11
            • 1970-01-01
            • 1970-01-01
            • 2018-06-05
            • 1970-01-01
            相关资源
            最近更新 更多