From 11ee7b428c58799a96cca3b0cc12703f9974c4e9 Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Mon, 25 Jul 2022 22:40:07 +0800 Subject: [PATCH] #34214 for main --- scripts/cocoapods/utils.rb | 12 ++++++++++++ scripts/react_native_pods.rb | 1 + 2 files changed, 13 insertions(+) diff --git a/scripts/cocoapods/utils.rb b/scripts/cocoapods/utils.rb index 732329f21b36d4..bc14b58378e27c 100644 --- a/scripts/cocoapods/utils.rb +++ b/scripts/cocoapods/utils.rb @@ -93,6 +93,18 @@ def self.fix_library_search_paths(installer) end end + def self.fix_react_bridging_header_search_paths(installer) + installer.target_installation_results.pod_target_installation_results + .each do |pod_name, target_installation_result| + target_installation_result.native_target.build_configurations.each do |config| + # For third party modules who have React-bridging dependency to search correct headers + config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) ' + config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging" ' + config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers" ' + end + end + end + def self.apply_mac_catalyst_patches(installer) # Fix bundle signing issues installer.pods_project.targets.each do |target| diff --git a/scripts/react_native_pods.rb b/scripts/react_native_pods.rb index 8390a3ab6d0e2a..34dc213326c5b6 100644 --- a/scripts/react_native_pods.rb +++ b/scripts/react_native_pods.rb @@ -156,6 +156,7 @@ def react_native_post_install(installer, react_native_path = "../node_modules/re ReactNativePodsUtils.exclude_i386_architecture_while_using_hermes(installer) ReactNativePodsUtils.fix_library_search_paths(installer) + ReactNativePodsUtils.fix_react_bridging_header_search_paths(installer) ReactNativePodsUtils.set_node_modules_user_settings(installer, react_native_path) NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)