fastlane: Cannot look up iTunes Connect provider IDs programmatically

New Issue Checklist

Issue Description

I am on several iTunes Connect teams, and have to use the -itc_provider argument with iTMSTransporter in order for it to know where to upload things. Currently the fastlane-documented way to get this value is to manually run iTMSTransporter with -m provider and just read what it spits out.

It would be nice if I could use fastlane’s iTMSTransporter wrapper to programmatically run that command and parse the output. Then I could map from iTC team IDs to provider IDs automatically, and not have to look up and hard code both values for each team.

Environment

✅ fastlane environment ✅

Stack

Key Value
OS 10.12.6
Ruby 2.4.0
Bundler? true
Git git version 2.14.2
Installation Source ~/.rvm/gems/ruby-2.4.0/bin/fastlane
Host Mac OS X 10.12.6 (16G29)
Ruby Lib Dir ~/.rvm/rubies/ruby-2.4.0/lib
OpenSSL Version OpenSSL 1.1.0e 16 Feb 2017
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 9.0

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE

fastlane files:

(omitted)

fastlane gems

Gem Version Update-Status
fastlane 2.63.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.1.0
io-console 0.4.6
CFPropertyList 2.3.5
i18n 0.8.6
minitest 5.10.3
thread_safe 0.3.6
tzinfo 1.2.3
activesupport 4.2.9
public_suffix 2.0.5
addressable 2.5.2
babosa 1.0.2
bundler 1.15.4
claide 1.0.2
fuzzy_match 2.0.4
nap 1.1.0
cocoapods-core 1.3.1
cocoapods-deintegrate 1.0.1
cocoapods-downloader 1.1.3
cocoapods-plugins 1.0.0
cocoapods-search 1.0.0
cocoapods-stats 1.0.0
netrc 0.7.8
cocoapods-trunk 1.2.0
cocoapods-try 1.1.0
colored2 3.1.2
escape 0.0.4
fourflusher 2.0.1
gh_inspector 1.0.3
molinillo 0.5.7
ruby-macho 1.1.0
nanaimo 0.2.3
xcodeproj 1.5.2
cocoapods 1.3.1
colored 1.2
highline 1.7.8
commander-fastlane 4.4.5
declarative 0.0.10
declarative-option 0.1.0
deep_merge 1.1.1
unf_ext 0.0.7.4
unf 0.1.4
domain_name 0.5.20170404
dotenv 2.2.1
excon 0.59.0
multipart-post 2.0.0
faraday 0.13.1
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
faraday_middleware 0.12.2
fastimage 2.1.0
jwt 2.1.0
little-plugger 1.1.4
multi_json 1.12.2
logging 2.2.2
memoist 0.16.0
os 0.9.6
signet 0.8.1
googleauth 0.6.1
httpclient 2.8.3
mime-types-data 3.2016.0521
mime-types 3.1
uber 0.1.0
representable 3.0.4
retriable 3.1.1
google-api-client 0.13.6
json 2.1.0
mini_magick 4.5.1
multi_xml 0.6.0
plist 3.3.0
rubyzip 1.2.1
security 0.1.3
slack-notifier 1.5.1
terminal-notifier 1.8.0
unicode-display_width 1.3.0
terminal-table 1.8.0
tty-screen 0.5.1
word_wrap 1.0.0
rouge 2.0.7
xcpretty 0.2.8
xcpretty-travis-formatter 1.0.0
flavors 0.2.0
table_print 1.5.6
trollop 2.1.2

generated on: 2017-11-03

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 3
  • Comments: 32 (14 by maintainers)

Commits related to this issue

Most upvoted comments

The output of iTMSTransporter -m provider looks like this. The provider ID is the “Short Name” column. You can see how in this case it is a mix of team IDs from newer accounts and slugs from older accounts. (You can also see where the interactive password prompt was.)

[2017-12-20 16:11:39 CST] <main>  INFO: Transporter is searching for updated software components.
[2017-12-20 16:11:39 CST] <main>  INFO: No updates found.
null's password: 
 
Provider listing:
    - Long Name -                          - Short Name -
1   From Now On, LLC                       234Z7G6S62
2   IMG College, LLC                       IMGCollege
3   Lincoln Consolidated School District   LH47NLSU59
4   Rogers State University                RogersStateUniversity
5   Texas A&M University - Corpus Christi  TexasAMUniversity-CorpusChristi
6   University of Arkansas                 UniversityofArkansas
7   University of Richmond                 UniversityofRichmond
8   Vanderbilt University                  VanderbiltITS
9   Walters Public School                  3AG896S277
10  West Plains R-VII School District      8T8K2ZY6S4
11  Yellville Summit School District       J4XCT8K72S

There is already code to find and invoke iTMSTransporter in itunes_transporter.rb in fastlane_core, but it is only capable of performing the transporter’s upload and lookupMetadata commands, and parsing their output. I believe the first place to do work on this would probably be in that file, itunes_transporter.rb.

Thanks! I just started looking into this last night.

This is still an outstanding issue that would be great to address.

Is anyone working on this? I still think it is very useful to have. If no one is, I’ll see if I can take a stab at it.

When you have multiple accounts, you need to collect 3 pieces of information.

  1. team_id which is the 10-character string
  2. itc_team_id which is the numeric itunes connect team id
  3. itc_provider_id which in newer accounts matches team_id, but for older accounts is a slug for the business name. (e.g. AwesomeOrgLLC)
   app_team_id = 'AB83BKF89B'
   itc_team_id = '1384242'
   itc_provider_id = 'AwesomeOrgLLC'

  upload_to_app_store(
      itc_provider: itc_provider_id || app_team_id,
      team_id: itc_team_id,
  )

This was also asked in #10710 This sort of relates to #9858 as itc_team_id and team_id are not the same.

It would be great if we could derive the iTunes Connect IDs based on the team_id, I am not 100% sure there is a link other than maybe the organization name.