Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🐛 Bug fixes

- [eas-cli] Fix capability sync failing for App Clip targets with the on-demand install entitlement. ([#4617](https://github.com/expo/eas-cli/pull/4617) by [@janicduplessis](https://github.com/janicduplessis))

### 🧹 Chores

- [build-tools] Disable the Argent video watermark in `eas/start_argent_remote_session`. ([#4574](https://github.com/expo/eas-cli/pull/4574) by [@szdziedzic](https://github.com/szdziedzic))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,46 @@ describe(syncCapabilitiesForEntitlementsAsync, () => {
]);
});

it('does not re-enable the on-demand install capability of an App Clip', async () => {
const capabilities = [
{
id: 'QQT5Y8UUW9_ON_DEMAND_INSTALL_CAPABLE',
attributes: { settings: null, capabilityType: 'ON_DEMAND_INSTALL_CAPABLE' },
},
].map(({ id, attributes }) => new BundleIdCapability(ctx, id, attributes as any));
const bundleId = createMockBundleId('QQT5Y8UUW9', capabilities);

const result = await syncCapabilitiesForEntitlementsAsync(
bundleId,
{ 'com.apple.developer.on-demand-install-capable': true },
noBroadcastNotificationOption
);

expect(result).toStrictEqual({ enabled: [], disabled: [] });
expect(bundleId.updateBundleIdCapabilityAsync).not.toHaveBeenCalled();
});

it('does not disable the on-demand install capability of an App Clip when the entitlement is absent', async () => {
const capabilities = [
{
id: 'QQT5Y8UUW9_ON_DEMAND_INSTALL_CAPABLE',
attributes: { settings: null, capabilityType: 'ON_DEMAND_INSTALL_CAPABLE' },
},
].map(({ id, attributes }) => new BundleIdCapability(ctx, id, attributes as any));
const bundleId = createMockBundleId('QQT5Y8UUW9', capabilities);

const result = await syncCapabilitiesForEntitlementsAsync(
bundleId,
{
'com.apple.developer.parent-application-identifiers': ['$(AppIdentifierPrefix)com.example'],
},
noBroadcastNotificationOption
);

expect(result).toStrictEqual({ enabled: [], disabled: [] });
expect(bundleId.updateBundleIdCapabilityAsync).not.toHaveBeenCalled();
});

it('skips syncing capabilities with settings if they do not contain the expected `enabled` field', async () => {
const capabilityJson = {
id: 'U78L9459DG_APPLE_ID_AUTH',
Expand Down Expand Up @@ -509,7 +549,7 @@ describe(syncCapabilitiesForEntitlementsAsync, () => {
option: 'ON',
},
{
capabilityType: 'ONDEMANDINSTALL_EXTENSIONS',
capabilityType: 'ON_DEMAND_INSTALL_CAPABLE',
option: 'ON',
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,12 @@ function getCapabilitiesToDisable(

for (const existingCapability of currentCapabilities) {
// GC and IAP are always enabled in apps by default so we should avoid modifying them.
// App Clip bundle IDs are created with ON_DEMAND_INSTALL_CAPABLE, and Xcode adds its
// entitlement at signing time, so it is often missing from the local entitlements.
if (
existingCapability.isType(CapabilityType.IN_APP_PURCHASE) ||
existingCapability.isType(CapabilityType.GAME_CENTER)
existingCapability.isType(CapabilityType.GAME_CENTER) ||
existingCapability.isType(CapabilityType.ON_DEMAND_INSTALL_CAPABLE)
) {
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ export const CapabilityMapping: CapabilityClassifier[] = [
{
entitlement: 'com.apple.developer.on-demand-install-capable',
name: 'On Demand Install Capable for App Clip Extensions',
capability: CapabilityType.ON_DEMAND_INSTALL_EXTENSIONS,
capability: CapabilityType.ON_DEMAND_INSTALL_CAPABLE,
validateOptions: validateBooleanOptions,
getSyncOperation: getBooleanSyncOperation,
},
Expand Down
Loading