From 42eebafb8180469ea4207e38f5ddc36267daba3d Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 4 Apr 2024 08:06:53 -0700 Subject: [PATCH] Fix static linking for Bridgeless mode (#43846) Summary: Working with gabrieldonadel, we realized that static frameworks of the React-RendererRuntime are not following the proper folder structure. When a user tries to import `ReactCommon/RCTHost` in the app delegate, for example, the user ends up with an error and they can't find the files. These changes fixes this by establishing the right folder structure in the static frameworks ## Changelog: [Internal] - Make sure that React-RuntimeCore and JSErrorHandler are created with the proper structure for static frameworks Pull Request resolved: https://github.com/facebook/react-native/pull/43846 Test Plan: Tested locally on an app with 0.74. Before: it failed to build. After: it build successfully. Reviewed By: cortinico Differential Revision: D55741581 Pulled By: cipolleschi fbshipit-source-id: 11ac0882d3feea05ef8904d55856ba5704b7a3b8 --- .../ReactCommon/jserrorhandler/React-jserrorhandler.podspec | 2 +- .../ReactCommon/react/runtime/React-RuntimeCore.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec b/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec index 3def87251c5..0202b890614 100644 --- a/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +++ b/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec @@ -41,7 +41,7 @@ Pod::Spec.new do |s| s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags if ENV['USE_FRAMEWORKS'] - s.header_mappings_dir = './' + s.header_mappings_dir = '../' s.module_name = 'React_jserrorhandler' end diff --git a/packages/react-native/ReactCommon/react/runtime/React-RuntimeCore.podspec b/packages/react-native/ReactCommon/react/runtime/React-RuntimeCore.podspec index 93f5f2f120e..141ad6a1eaf 100644 --- a/packages/react-native/ReactCommon/react/runtime/React-RuntimeCore.podspec +++ b/packages/react-native/ReactCommon/react/runtime/React-RuntimeCore.podspec @@ -42,7 +42,7 @@ Pod::Spec.new do |s| s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags if ENV['USE_FRAMEWORKS'] - s.header_mappings_dir = './' + s.header_mappings_dir = '../../' s.module_name = 'React_RuntimeCore' end