From 7667517ddf2ab16afa39cd67cf1df20801bbc672 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Fri, 2 Oct 2026 23:08:32 +0200 Subject: [PATCH] fix(bundler): pass env.catalyst when bundling for Mac Catalyst A Catalyst build bundles as iOS (its platform data says ios), so the app's webpack config could not tell the two apart. Catalyst builds now also get env.catalyst, which an app can turn into a compile-time flag. Co-Authored-By: Claude Opus 5.5 --- lib/services/bundler/bundler-compiler-service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/services/bundler/bundler-compiler-service.ts b/lib/services/bundler/bundler-compiler-service.ts index 8a8d7f8ec0..d2a2bab20f 100644 --- a/lib/services/bundler/bundler-compiler-service.ts +++ b/lib/services/bundler/bundler-compiler-service.ts @@ -826,6 +826,10 @@ export class BundlerCompilerService const { env } = prepareData; const platformKey = platform.toLowerCase(); const envData = Object.assign({}, env, { [platformKey]: true }); + // Catalyst bundles as iOS (platformData says ios); flag it so the app can tell them apart. + if (this.$mobileHelper.isCatalystPlatform(prepareData.platform)) { + envData.catalyst = true; + } const appId = projectData.projectIdentifiers[platform]; const appPath = projectData.getAppDirectoryRelativePath();