From ca4a03d1ef1cd006313796635c7313770ce6c31d Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Sun, 23 Aug 2026 01:52:59 -0400 Subject: [PATCH] Use $(PODS_ROOT) for the VFS overlay flag in aggregate and third-party xcconfigs configure_aggregate_xcconfig interpolated the absolute resolved path of React-VFS.yaml into every aggregate and third-party pod xcconfig, while add_rncore_dependency already emits the same flag as $(PODS_ROOT)/React-Core-prebuilt/React-VFS.yaml for podspec-processed pods. The absolute form ties the generated Pods directory to the checkout that ran pod install: a Pods directory restored from a CI cache or cloned into a git worktree keeps pointing at the original checkout's overlay for as long as that path exists, and fails without naming the real cause once it does not. Emit the $(PODS_ROOT) form here too. Xcode expands the variable before clang reads the flag, and the existence check above still runs against the resolved absolute path at install time. --- packages/react-native/scripts/cocoapods/rncore.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/scripts/cocoapods/rncore.rb b/packages/react-native/scripts/cocoapods/rncore.rb index 252588c98432..f70fd9c8131b 100644 --- a/packages/react-native/scripts/cocoapods/rncore.rb +++ b/packages/react-native/scripts/cocoapods/rncore.rb @@ -573,8 +573,8 @@ def self.configure_aggregate_xcconfig(installer) rncore_log("Configuring xcconfig for prebuilt React Native Core...") - vfs_overlay_flag = " -ivfsoverlay \"#{vfs_overlay_path}\"" - swift_vfs_overlay_flag = " -Xcc -ivfsoverlay -Xcc \"#{vfs_overlay_path}\"" + vfs_overlay_flag = " -ivfsoverlay \"$(PODS_ROOT)/React-Core-prebuilt/React-VFS.yaml\"" + swift_vfs_overlay_flag = " -Xcc -ivfsoverlay -Xcc \"$(PODS_ROOT)/React-Core-prebuilt/React-VFS.yaml\"" # Add flags to aggregate target xcconfigs (these are used by the main app target) installer.aggregate_targets.each do |aggregate_target|