From 21902d70ba9bfa6db70732f2d4418cfcf3196b8e Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 8 Nov 2023 03:31:18 -0800 Subject: [PATCH] Cleanup React-Core (#41356) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41356 React-Core does not depends on any bit of ReactCommon, React-RCTFabric or React-NativeModuleApple, so I'm cleaning that up. ## Context Last week I helped macOS to work with static framework. When multiple platforms are specified, frameworks are build in two variants, the iOS and macOS one. This break all the HEADER_SEARCH_PATHS as now we have to properly specify the base folder from which the search path is generated. See also [this PR](https://github.com/microsoft/react-native-macos/pull/1967) where I manually make MacOS work with `use_framewroks!` ## Changelog: [Internal] - Add helper function to create header_search_path Reviewed By: shwanton Differential Revision: D51030115 fbshipit-source-id: f87dbfe99e90d52cf8c07057be22cd024e38db42 --- packages/react-native/React-Core.podspec | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/react-native/React-Core.podspec b/packages/react-native/React-Core.podspec index 87bb8fa15a2..da75b42c0ac 100644 --- a/packages/react-native/React-Core.podspec +++ b/packages/react-native/React-Core.podspec @@ -22,7 +22,6 @@ socket_rocket_version = '0.7.0' boost_compiler_flags = '-Wno-documentation' use_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == '1' -use_frameworks = ENV['USE_FRAMEWORKS'] != nil header_subspecs = { 'CoreModulesHeaders' => 'React/CoreModules/**/*.h', @@ -40,8 +39,6 @@ header_subspecs = { frameworks_search_paths = [] frameworks_search_paths << "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-hermes\"" if use_hermes -frameworks_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon\"" if use_frameworks -frameworks_search_paths << "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric\"" if use_frameworks header_search_paths = [ "$(PODS_TARGET_SRCROOT)/ReactCommon", @@ -51,15 +48,10 @@ header_search_paths = [ "$(PODS_ROOT)/RCT-Folly", "${PODS_ROOT}/Headers/Public/FlipperKit", "$(PODS_ROOT)/Headers/Public/ReactCommon", - "$(PODS_ROOT)/Headers/Public/React-RCTFabric" ].concat(use_hermes ? [ "$(PODS_ROOT)/Headers/Public/React-hermes", "$(PODS_ROOT)/Headers/Public/hermes-engine" -] : []).concat(use_frameworks ? [ - "$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers", - "$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", - "$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers" -] : []).map{|p| "\"#{p}\""}.join(" ") +] : []) Pod::Spec.new do |s| s.name = "React-Core"