Skip to content

[eas-cli] Fix capability sync for App Clip on-demand install - #4617

Open
janicduplessis wants to merge 3 commits into
expo:mainfrom
janicduplessis:@janic/fix-app-clip-on-demand-install-capability
Open

janicduplessis wants to merge 3 commits into
expo:mainfrom
janicduplessis:@janic/fix-app-clip-on-demand-install-capability

Conversation

@janicduplessis

@janicduplessis janicduplessis commented Oct 13, 2026 •

Copy link
Copy Markdown

Why

iOS builds with an App Clip target fail during credentials setup for the Clip, unless EXPO_NO_CAPABILITY_SYNC=1 is set:

- Syncing capabilities
Failed to patch capabilities: [ { capabilityType: 'ONDEMANDINSTALL_EXTENSIONS', option: 'ON' } ]
✖ Failed to sync capabilities com.example.app.Clip
Apple API error: The request entity is not a valid request document object - Unexpected or invalid value at 'data.relationships.bundleIdCapabilities.data.[0].attributes'.

How

Map com.apple.developer.on-demand-install-capable to CapabilityType.ON_DEMAND_INSTALL_CAPABLE, the type App Store Connect actually reports, instead of ON_DEMAND_INSTALL_EXTENSIONS.

The Clip's bundle ID already has the capability:

{ "id": "QQT5Y8UUW9_ON_DEMAND_INSTALL_CAPABLE", "attributes": { "settings": null, "capabilityType": "ON_DEMAND_INSTALL_CAPABLE" } }

With the old mapping the sync never matched it, so it sent an enable request for ONDEMANDINSTALL_EXTENSIONS on every build, which Apple rejects. Now it is matched and skipped.

Once the capability is mapped, the disable pass would also turn it off on any App Clip whose entitlements file doesn't list the key. Xcode often adds that key only at signing time. So ON_DEMAND_INSTALL_CAPABLE is never disabled, like In-App Purchase and Game Center.

I only tested a Clip whose bundle ID already had the capability. I didn't test enabling it on a bundle ID that lacks it.

Test Plan

  • New test: remote bundle ID already has ON_DEMAND_INSTALL_CAPABLE and the entitlement is true, so no patch request is sent. It fails without the fix.
  • New test: remote bundle ID has ON_DEMAND_INSTALL_CAPABLE and the entitlement is absent, so no patch request is sent.
  • Updated the expected type in the "enables all capabilities" test.
  • Patched a global eas-cli@24.8.0 the same way and ran eas build --platform ios on a real project with an App Clip target and capability sync on. Before: the error above. After:
✔ Synced capabilities: No updates

Map com.apple.developer.on-demand-install-capable to Apple's ON_DEMAND_INSTALL_CAPABLE capability type. App Store Connect reports App Clip bundle IDs with that type, so the sync never matched the existing capability and tried to enable ONDEMANDINSTALL_EXTENSIONS, which Apple rejects.
@janicduplessis
janicduplessis force-pushed the @janic/fix-app-clip-on-demand-install-capability branch from 9616aaa to b1af993 Compare October 13, 2026 22:35
@janicduplessis
janicduplessis marked this pull request as ready for review October 13, 2026 22:44
@github-actions

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.

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.

2 participants