Skip to content

[eas-cli] Add support for configuring app store connect connection#3558

Open
sswrk wants to merge 16 commits intomainfrom
szymonswierk/eng-20384-cli-add-support-for-configuring-app-store-connect
Open

[eas-cli] Add support for configuring app store connect connection#3558
sswrk wants to merge 16 commits intomainfrom
szymonswierk/eng-20384-cli-add-support-for-configuring-app-store-connect

Conversation

@sswrk
Copy link
Copy Markdown
Contributor

@sswrk sswrk commented Mar 30, 2026

Why

We're adding App Store Connect integration support. The UI for configuring such connection is available in the web dashboard, but it would also be useful to have it in the CLI – this is the goal of this PR.

How

  • Added the new connections oclif topic.
  • eas connections:asc:status – check the status of the current project's connection.
  • eas connections:asc:connect – go through the process of connecting the current project with an ASC app.
    • Requires an ASC API key – user is prompted to select one of the existing ones, or, if no existing one, they go through the process of key creation.
    • Queries the available ASC apps and requires to select one.
  • eas connections:asc:disconnect – disconnects the current project from the ASC app.

Test Plan

Interactive mode testing:

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:status
✔ Fetched App Store Connect app link status

Project @<owner>/<project-slug>: Connected to App Store Connect.
  ASC App ID:  <asc-app-id>
  Name:        <app-name>
  Bundle ID:   <bundle-id>
  Apple URL:   https://appstoreconnect.apple.com/apps/<asc-app-id>/distribution

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:disconnect
✔ Checked current status

Project @<owner>/<project-slug>: Connected to App Store Connect.
  ASC App ID:  <asc-app-id>
  Name:        <app-name>
  Bundle ID:   <bundle-id>
  Apple URL:   https://appstoreconnect.apple.com/apps/<asc-app-id>/distribution

You are about to disconnect this project from its App Store Connect app.
This action is reversible by reconnecting.

✔ Are you sure you wish to proceed? … no / yes
✔ Disconnected App Store Connect app
✔ Verified disconnection
Project @<owner>/<project-slug>: Not connected to App Store Connect.

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:status
✔ Fetched App Store Connect app link status

Project @<owner>/<project-slug>: Not connected to App Store Connect.

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:connect
✔ Checked current status
✔ Found 1 API key(s)
✔ Select an App Store Connect API key: › Key ID: <api-key-id>
    Name: <api-key-name>
    Team ID: <team-id>, Team name: <team-name>
    Updated: <relative-time>
✔ Found 19 app(s) on App Store Connect
✔ Select an App Store Connect app: › <app-name> (<bundle-id>) [<asc-app-id>]
✔ Connected project to App Store Connect app
✔ Verified connection

Project @<owner>/<project-slug>: Connected to App Store Connect.
  ASC App ID:  <asc-app-id>
  Name:        <app-name>
  Bundle ID:   <bundle-id>
  Apple URL:   https://appstoreconnect.apple.com/apps/<asc-app-id>/distribution

Non-interactive mode:

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:status --non-interactive

✔ Fetched App Store Connect app link status

Project @<owner>/<project-slug>: Connected to App Store Connect.
  ASC App ID:  <asc-app-id>
  Name:        <app-name>
  Bundle ID:   <bundle-id>
  Apple URL:   https://appstoreconnect.apple.com/apps/<asc-app-id>/distribution

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:disconnect --non-interactive --yes
✔ Checked current status
✔ Disconnected App Store Connect app
✔ Verified disconnection

Project @<owner>/<project-slug>: Not connected to App Store Connect.

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:status --non-interactive

✔ Fetched App Store Connect app link status

Project @<owner>/<project-slug>: Not connected to App Store Connect.

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:connect \
  --non-interactive \
  --api-key-id <api-key-id> \
  --asc-app-id <asc-app-id>
✔ Checked current status
✔ Found 1 API key(s)
✔ Found 19 app(s) on App Store Connect
✔ Connected project to App Store Connect app
✔ Verified connection

Project @<owner>/<project-slug>: Connected to App Store Connect.
  ASC App ID:  <asc-app-id>
  Name:        <app-name>
  Bundle ID:   <bundle-id>
  Apple URL:   https://appstoreconnect.apple.com/apps/<asc-app-id>/distribution

@linear
Copy link
Copy Markdown

linear bot commented Mar 30, 2026

@sswrk sswrk force-pushed the szymonswierk/eng-20384-cli-add-support-for-configuring-app-store-connect branch 5 times, most recently from 3f62741 to bbf0b21 Compare March 31, 2026 12:57
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 84.75836% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.15%. Comparing base (3a70a5d) to head (ccbe0fb).

Files with missing lines Patch % Lines
packages/eas-cli/src/connections/asc/ascApiKey.ts 21.43% 11 Missing ⚠️
...es/eas-cli/src/commands/connections/asc/connect.ts 89.29% 8 Missing and 1 partial ⚠️
...ges/eas-cli/src/graphql/queries/AscAppLinkQuery.ts 38.47% 8 Missing ⚠️
...eas-cli/src/commands/connections/asc/disconnect.ts 91.67% 6 Missing ⚠️
...as-cli/src/graphql/mutations/AscAppLinkMutation.ts 37.50% 5 Missing ⚠️
...as-cli/src/credentials/ios/appstore/AppStoreApi.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3558      +/-   ##
==========================================
+ Coverage   54.86%   55.15%   +0.30%     
==========================================
  Files         836      843       +7     
  Lines       35901    36167     +266     
  Branches     7492     7545      +53     
==========================================
+ Hits        19694    19946     +252     
- Misses      16112    16125      +13     
- Partials       95       96       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sswrk sswrk force-pushed the szymonswierk/eng-20384-cli-add-support-for-configuring-app-store-connect branch from bbf0b21 to ee2dc34 Compare March 31, 2026 13:13
@sswrk sswrk marked this pull request as ready for review March 31, 2026 14:31
@github-actions
Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

@sswrk sswrk requested review from douglowder and sjchmiela March 31, 2026 14:32
@douglowder douglowder requested a review from quinlanj March 31, 2026 22:17
Copy link
Copy Markdown
Contributor

@douglowder douglowder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Adding @quinlanj for the review.

@sswrk sswrk requested a review from quinlanj April 7, 2026 11:09
ok,
action,
project: metadata.fullName,
connected: link !== null,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apart from "connected" maybe we should also mention something like "valid"? for situation when ascAppIdentifier is set, but remoteAppStoreConnectApp is emtpy (like revoked API key)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok i see ok, hmm, maybe valid would be better? or maybe we shouldn't even have connected because valid: false, connected: true is confusign and maybe we should have status: "not-connected" | "connected" | "invalid"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 00a0b87

Comment: the GQL query returns an error when remoteAppStoreConnectApp cannot be loaded because of the API key being revoked. remoteAppStoreConnectApp is not-null.

` ASC App ID: ${chalk.bold(link.ascAppIdentifier)}`,
];

if (link.remoteAppStoreConnectApp) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think lack of remoteAppStoreConnectApp should be considered invalid state, wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 2039600

"channel": {
"description": "manage update channels"
},
"connections": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i feel weird adding a new connection just for this without a bigger plan for adding more things under it. like @FiberJW is adding eas convex:init in #3575 so maybe we should do eas app_store_connect:connect? eas project:app_store_connect:connect? eas connections:convex:init (don't like that)?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan on changing that draft to fall under a eas connections: namespace. Something like eas connections:add convex or eas connections:convex init

Copy link
Copy Markdown
Contributor Author

@sswrk sswrk Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 @FiberJW let's make our PRs consistent in terms of command naming.

To explain my way of thinking:

  • Why eas connections:asc:connect and not eas connections:connect:asc? I think it's more intuitive when the verb goes last, and everything proceeding narrows down the scope (from most general to most specific).
  • Why connect and not init? Because creating an association is the only thing this command does – no setting up anything on the ASC side etc.
  • Why connect and not create or add? One could argue that connections:asc:connect is redundant, and that's a valid point. My opinion is that connect just adds extra precision.

I'm open to changes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support this format. "integrations" would also be a good top-level namespace. "eas integrations asc/convex connect" flows well, but we can go with "connections"

@sswrk sswrk force-pushed the szymonswierk/eng-20384-cli-add-support-for-configuring-app-store-connect branch from 32dc9f8 to 00a0b87 Compare April 14, 2026 10:01
@github-actions
Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants