From 6c0ae3ad5e9168e1d2c98b11406beae609fca7a5 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Wed, 30 Sep 2026 17:18:53 +0800 Subject: [PATCH] Fix duplicated react/utils prefix in React-utils static header layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The platformios subspec inherits header_dir "react/utils" from the parent spec, and maps its headers relative to "platform/ios" — a directory whose own layout already starts with react/utils. In a non-frameworks build both layers are applied in sequence, so the platform headers land at Pods/Headers/{Public,Private}/React-utils/react/utils/react/utils/*.h. Because of that, #include — reached from the React/Utils.h umbrella, which several modules now include — cannot be resolved and RNTester fails to build in the default static configuration: Pods/Headers/Public/React-utils/React/Utils.h:36:10: fatal error: 'react/utils/LowPriorityExecutor.h' file not found Clear the inherited header_dir on the subspec instead of moving the mapping directory: the mapping already contributes the react/utils prefix, and header_dir does not take part in the framework header copy path, so the USE_FRAMEWORKS layout (React_utils.framework/Headers/react/utils/*.h) is unchanged. --- .../react-native/ReactCommon/react/utils/React-utils.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/ReactCommon/react/utils/React-utils.podspec b/packages/react-native/ReactCommon/react/utils/React-utils.podspec index 196e24b90b63..71927e052147 100644 --- a/packages/react-native/ReactCommon/react/utils/React-utils.podspec +++ b/packages/react-native/ReactCommon/react/utils/React-utils.podspec @@ -58,6 +58,7 @@ Pod::Spec.new do |s| s.subspec "platformios" do |ss| ss.source_files = podspec_sources("platform/ios/**/*.{m,mm,cpp,h}", "platform/ios/**/*.h") + ss.header_dir = "" ss.header_mappings_dir = "platform/ios" end