From 2cec0c7a75f558296feb91b65e6d8d022aa9f33c Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Thu, 22 Jan 2026 16:04:04 +0100 Subject: [PATCH 1/4] fix: fix `@react-native-community/cli-platform-apple` not being resolved correctly --- packages/react-native/react-native.config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-native/react-native.config.js b/packages/react-native/react-native.config.js index 46579f1475b48b..5e79b8c3477516 100644 --- a/packages/react-native/react-native.config.js +++ b/packages/react-native/react-native.config.js @@ -71,8 +71,10 @@ try { // [macOS let apple; try { + const startDir = process.cwd(); + const iosPath = require.resolve('@react-native-community/cli-platform-ios', {paths: [startDir]}); // $FlowFixMe[untyped-import] - apple = require('@react-native-community/cli-platform-apple'); + apple = findCommunityPlatformPackage('@react-native-community/cli-platform-apple', iosPath); } catch { if (verbose) { console.warn( @@ -156,7 +158,7 @@ if (android != null) { // [macOS config.commands.push(...macosCommands); -if (apple != null) { +if (apple) { config.platforms.macos = { linkConfig: () => { return { From 6a67b0022641a0cbf7a474213bca1560a8d2b034 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:20:56 +0100 Subject: [PATCH 2/4] format --- packages/react-native/react-native.config.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/react-native/react-native.config.js b/packages/react-native/react-native.config.js index 5e79b8c3477516..b1823719223a30 100644 --- a/packages/react-native/react-native.config.js +++ b/packages/react-native/react-native.config.js @@ -71,10 +71,16 @@ try { // [macOS let apple; try { - const startDir = process.cwd(); - const iosPath = require.resolve('@react-native-community/cli-platform-ios', {paths: [startDir]}); + const projectRoot = {paths: [process.cwd()]}; + const iosPath = require.resolve( + '@react-native-community/cli-platform-ios', + projectRoot, + ); // $FlowFixMe[untyped-import] - apple = findCommunityPlatformPackage('@react-native-community/cli-platform-apple', iosPath); + apple = findCommunityPlatformPackage( + '@react-native-community/cli-platform-apple', + iosPath, + ); } catch { if (verbose) { console.warn( From 8eeae248f77310320252450adc374c86721ce539 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:22:49 +0100 Subject: [PATCH 3/4] flow fix --- packages/react-native/react-native.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-native/react-native.config.js b/packages/react-native/react-native.config.js index b1823719223a30..5a0a0f99ca7c79 100644 --- a/packages/react-native/react-native.config.js +++ b/packages/react-native/react-native.config.js @@ -71,10 +71,9 @@ try { // [macOS let apple; try { - const projectRoot = {paths: [process.cwd()]}; const iosPath = require.resolve( '@react-native-community/cli-platform-ios', - projectRoot, + {paths: [process.cwd()]}, ); // $FlowFixMe[untyped-import] apple = findCommunityPlatformPackage( From 3e7828a2fba6bd9a700dd6d583a31bc27d2458ba Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:26:54 +0100 Subject: [PATCH 4/4] weird format but ok --- packages/react-native/react-native.config.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/react-native/react-native.config.js b/packages/react-native/react-native.config.js index 5a0a0f99ca7c79..4fc760e979c04d 100644 --- a/packages/react-native/react-native.config.js +++ b/packages/react-native/react-native.config.js @@ -71,10 +71,9 @@ try { // [macOS let apple; try { - const iosPath = require.resolve( - '@react-native-community/cli-platform-ios', - {paths: [process.cwd()]}, - ); + const iosPath = require.resolve('@react-native-community/cli-platform-ios', { + paths: [process.cwd()], + }); // $FlowFixMe[untyped-import] apple = findCommunityPlatformPackage( '@react-native-community/cli-platform-apple',