Skip to content

Commit

Permalink
fix: check "eas.build.experimental.ios.appExtensions" config compatib…
Browse files Browse the repository at this point in the history
…ility
  • Loading branch information
achorein committed Apr 7, 2024
1 parent 1b599c0 commit e6de7d7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugin/src/withCompatibilityChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,15 @@ export const withCompatibilityChecker: ConfigPlugin = (config) => {
);
}

const extraAppExtension =
config.extra?.eas?.build?.experimental?.ios?.appExtensions?.filter(
(appExtension: any) => appExtension.targetName === "ShareExtension",
);
if (extraAppExtension && extraAppExtension.length > 1) {
throw new Error(
`[${packageInfo.name}] Incompatibility found, you have more than one appExtensions for "ShareExtension" (${extraAppExtension.length}). Please remove all "eas.build.experimental.ios.appExtensions" with targetName "ShareExtension" in your app.json! (see https://github.com/achorein/expo-share-intent?tab=readme-ov-file#ios-extension-target)`,
);
}

return config;
};

0 comments on commit e6de7d7

Please sign in to comment.