Skip to content

Commit

Permalink
Cleanup React-Core
Browse files Browse the repository at this point in the history
Summary:
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](microsoft#1967) where I manually make MacOS work with `use_framewroks!`

## Changelog:
[Internal] - Add helper function to create header_search_path

Differential Revision: D51030115
  • Loading branch information
Riccardo Cipolleschi authored and facebook-github-bot committed Nov 7, 2023
1 parent f87f1ba commit 82a0b53
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions packages/react-native/React-Core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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",
Expand All @@ -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"
Expand Down

0 comments on commit 82a0b53

Please sign in to comment.