Skip to content

[eas-cli] Add --refresh-ad-hoc-provisioning-profile for non-interactive builds#3716

Open
sswrk wants to merge 1 commit into
mainfrom
szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in
Open

[eas-cli] Add --refresh-ad-hoc-provisioning-profile for non-interactive builds#3716
sswrk wants to merge 1 commit into
mainfrom
szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in

Conversation

@sswrk
Copy link
Copy Markdown
Contributor

@sswrk sswrk commented May 12, 2026

Why

When a new device is added to an account, and a non-interactive development build is run (e.g. invoked by CI or by a workflow job), even without the freeze-credentials flag, the provisioning profile is not refreshed, and the internal build is not available for the newly registered device. See the Linear issue: https://linear.app/expo/issue/ENG-7041/allow-including-all-eas-registered-devices-automatically-in-non

How

Added an opt-in ad-hoc provisioning profile refresh to non-interactive builds with flag --refresh-ad-hoc-provisioning-profile.

When the flag is present, we hit www GQL API to get the ASC API key (the submission key), and we invoke the ad-hoc profile sync with all devices selected. packages/eas-cli/src/credentials/ios/actions/SetUpAdhocProvisioningProfile.ts is where this logic happens.

The flag mustn't be present when --freeze-credentials is present, these are conflicting flags.

I'm leaning towards an opt-in flag instead of extending the default behavior because of the extra credentials configuration requirements and side effects of the provisioning profile refresh logic.

Test Plan

Added/amended tests.

Manual verification:

  1. Did easd build --platform ios --profile development --non-interactive --refresh-ad-hoc-credential, verified the provisioning profile matches the set of Apple devices on my account.
  2. Changed the set of Apple devices on my account.
  3. easd build --platform ios --profile development --non-interactive --refresh-ad-hoc-credential again, verified the re-generated provisioning profile matches the Apple devices on my account.

@linear
Copy link
Copy Markdown

linear Bot commented May 12, 2026

ENG-7041

Copy link
Copy Markdown
Contributor Author

sswrk commented May 12, 2026

@sswrk sswrk force-pushed the szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in branch 2 times, most recently from 5896f86 to 6a7e606 Compare May 12, 2026 19:20
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 83.01887% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.69%. Comparing base (4f670f9) to head (b9c092e).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
packages/eas-cli/src/commands/build/index.ts 0.00% 5 Missing ⚠️
...tials/ios/actions/SetUpAdhocProvisioningProfile.ts 91.43% 3 Missing ⚠️
packages/eas-cli/src/build/createContext.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3716      +/-   ##
==========================================
+ Coverage   56.66%   56.69%   +0.04%     
==========================================
  Files         888      892       +4     
  Lines       38488    38619     +131     
  Branches     8022     8054      +32     
==========================================
+ Hits        21804    21891      +87     
- Misses      16586    16630      +44     
  Partials       98       98              

☔ 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-7041-allow-including-all-eas-registered-devices-automatically-in branch from 6a7e606 to 3ace75d Compare May 12, 2026 19:36
@sswrk sswrk changed the title [eas-cli] Add --refresh-ad-hoc-provisioning-profile for non-interactive builds [eas-cli] Add --refresh-ad-hoc-provisioning-profile for non-interactive builds May 12, 2026
@sswrk sswrk force-pushed the szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in branch from 3ace75d to cf3043f Compare May 12, 2026 19:53
@sswrk sswrk force-pushed the szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in branch from cf3043f to b9c092e Compare May 12, 2026 19:56
@github-actions
Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@sswrk sswrk marked this pull request as ready for review May 12, 2026 20:36
@github-actions
Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder
packages/eas-cli/src/commands/build/** @sjchmiela
packages/eas-cli/src/build/** @sjchmiela

Generated by CodeMention

@sswrk sswrk requested review from quinlanj and sjchmiela May 12, 2026 20:37
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.

1 participant