Skip to content

Commit fa2acc3

Browse files
committed
Fix React-bridging header not found for third party modules
1 parent 30d1e20 commit fa2acc3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/react_native_pods.rb

+13
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,18 @@ def fix_config(config)
268268
end
269269
end
270270

271+
def fix_react_bridging_header_search_paths(installer)
272+
installer.target_installation_results.pod_target_installation_results
273+
.each do |pod_name, target_installation_result|
274+
target_installation_result.native_target.build_configurations.each do |config|
275+
# For third party modules who have React-bridging dependency to search correct headers
276+
config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) '
277+
config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging" '
278+
config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers" '
279+
end
280+
end
281+
end
282+
271283
def set_node_modules_user_settings(installer, react_native_path)
272284
puts "Setting REACT_NATIVE build settings"
273285
projects = installer.aggregate_targets
@@ -291,6 +303,7 @@ def react_native_post_install(installer, react_native_path = "../node_modules/re
291303

292304
exclude_architectures(installer)
293305
fix_library_search_paths(installer)
306+
fix_react_bridging_header_search_paths(installer)
294307

295308
cpp_flags = DEFAULT_OTHER_CPLUSPLUSFLAGS
296309
if ENV['RCT_NEW_ARCH_ENABLED'] == '1'

0 commit comments

Comments
 (0)