Skip to content

[eas-cli] Keep linked capability identifiers when syncing another one - #4584

Open
ceydaakin wants to merge 3 commits into
expo:mainfrom
ceydaakin:fix/capability-sync-keeps-linked-identifiers
Open

ceydaakin wants to merge 3 commits into
expo:mainfrom
ceydaakin:fix/capability-sync-keeps-linked-identifiers

Conversation

@ceydaakin

Copy link
Copy Markdown

Why

Fixes #4445.

When a bundle ID already has App Group A linked and the entitlements list both A and B, capability sync sends only B in the relationship update. The update replaces the linked identifiers, so A is unlinked and the provisioning profile no longer satisfies the app's entitlements. The same code path handles Merchant IDs and iCloud containers.

How

syncCapabilityIdentifiersForEntitlementsAsync skipped identifiers that were already linked when building the relationship list. It now sends every identifier from the entitlements, and only issues an update when at least one of them is not linked yet. The linked and created results it returns are unchanged, so the CLI output is the same.

Test Plan

  • Added a test with group.expo already linked and group.bacon new: the update must contain both. It fails on main (only XXX-group-2 is sent) and passes with this change.
  • The existing tests still cover the "everything already linked, no update" case.
  • yarn jest src/credentials/ios/appstore in packages/eas-cli: 76 tests pass. oxlint and oxfmt --check are clean.

I did not run this against the Apple Developer API. That the update replaces the linked identifiers is taken from the issue report and from the existing test, which expects an identifier missing from the entitlements to be dropped.

The capability update replaces the identifiers linked to a bundle ID, but only the newly linked ones were sent. Adding a second App Group, Merchant ID or iCloud container unlinked the ones that were already linked.

Fixes expo#4445
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
packages/eas-cli/** @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

@douglowder

Copy link
Copy Markdown
Contributor

eas-cli now uses changesets for changelogs (#4580). The required "Check for a changeset" check fails on PRs that edit CHANGELOG.md.

To update this PR:

  1. Revert the changes to CHANGELOG.md.
  2. Run yarn changeset, select the changed packages and the bump type, and write the summary.
  3. Commit the new file in .changeset/.

The release adds the PR link and the author to the entry. If this PR needs no changelog entry, revert the CHANGELOG.md changes and add the "no changelog" label.

@ceydaakin

Copy link
Copy Markdown
Author

@douglowder Thanks, done. I reverted the CHANGELOG.md changes and added .changeset/capability-sync-keeps-linked-identifiers.md (eas-cli: patch).

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.

iOS capability sync unlinks existing App Groups when adding another group

2 participants