diff --git a/packages/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec b/packages/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec index 5bf0a98802dc70..360a3e296ae4bd 100644 --- a/packages/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec +++ b/packages/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec @@ -28,7 +28,10 @@ header_search_paths = [ if ENV["USE_FRAMEWORKS"] header_search_paths = header_search_paths.concat([ "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"" + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"", + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers/build/generated/ios\"", + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"", + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"" ]) end diff --git a/packages/react-native/Libraries/Network/React-RCTNetwork.podspec b/packages/react-native/Libraries/Network/React-RCTNetwork.podspec index d8f54459dfe410..865dc41299094d 100644 --- a/packages/react-native/Libraries/Network/React-RCTNetwork.podspec +++ b/packages/react-native/Libraries/Network/React-RCTNetwork.podspec @@ -28,7 +28,11 @@ header_search_paths = [ if ENV["USE_FRAMEWORKS"] header_search_paths = header_search_paths.concat([ "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"" + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"", + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers/build/generated/ios\"", + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"", + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"", + ]) end diff --git a/packages/react-native/Libraries/Settings/React-RCTSettings.podspec b/packages/react-native/Libraries/Settings/React-RCTSettings.podspec index 4bbd4e476bd06b..9fa55fded754fc 100644 --- a/packages/react-native/Libraries/Settings/React-RCTSettings.podspec +++ b/packages/react-native/Libraries/Settings/React-RCTSettings.podspec @@ -28,7 +28,10 @@ header_search_paths = [ if ENV["USE_FRAMEWORKS"] header_search_paths = header_search_paths.concat([ "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"" + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"", + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers/build/generated/ios\"", + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"", + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"", ]) end diff --git a/packages/react-native/Libraries/Vibration/React-RCTVibration.podspec b/packages/react-native/Libraries/Vibration/React-RCTVibration.podspec index 2eb4c33882d78e..616611ea137591 100644 --- a/packages/react-native/Libraries/Vibration/React-RCTVibration.podspec +++ b/packages/react-native/Libraries/Vibration/React-RCTVibration.podspec @@ -28,7 +28,9 @@ header_search_paths = [ if ENV["USE_FRAMEWORKS"] header_search_paths = header_search_paths.concat([ "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", - "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"" + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"", + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"", + "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"" ]) end diff --git a/packages/react-native/ReactCommon/React-Fabric.podspec b/packages/react-native/ReactCommon/React-Fabric.podspec index 1ecfe08202d912..fe368542e99605 100644 --- a/packages/react-native/ReactCommon/React-Fabric.podspec +++ b/packages/react-native/ReactCommon/React-Fabric.podspec @@ -37,7 +37,7 @@ Pod::Spec.new do |s| "DEFINES_MODULE" => "YES" } if ENV['USE_FRAMEWORKS'] - s.header_mappings_dir = './' + s.header_mappings_dir = File.absolute_path('./') s.module_name = 'React_Fabric' end diff --git a/packages/react-native/ReactCommon/React-rncore.podspec b/packages/react-native/ReactCommon/React-rncore.podspec index 62838bb5fe47cd..5465ed61a953e7 100644 --- a/packages/react-native/ReactCommon/React-rncore.podspec +++ b/packages/react-native/ReactCommon/React-rncore.podspec @@ -26,6 +26,17 @@ react_native_dependency_path = ENV['REACT_NATIVE_PATH'] # Relative path to react native from current podspec react_native_sources_path = '..' +header_search_paths = [ + "\"$(PODS_TARGET_SRCROOT)\"", + "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"", +] + +if ENV["USE_FRAMEWORKS"] + header_search_paths = header_search_paths.concat([ + "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"", + ]) +end + Pod::Spec.new do |s| s.name = "React-rncore" s.version = version @@ -37,6 +48,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "dummyFile.cpp" s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", + "HEADER_SEARCH_PATHS" => header_search_paths.join(' '), "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" } diff --git a/packages/react-native/ReactCommon/ReactCommon.podspec b/packages/react-native/ReactCommon/ReactCommon.podspec index 448907b3b8f26e..ff6abe3da9d758 100644 --- a/packages/react-native/ReactCommon/ReactCommon.podspec +++ b/packages/react-native/ReactCommon/ReactCommon.podspec @@ -37,7 +37,7 @@ Pod::Spec.new do |s| "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", "GCC_WARN_PEDANTIC" => "YES" } if ENV['USE_FRAMEWORKS'] - s.header_mappings_dir = './' + s.header_mappings_dir = File.absolute_path("./") end # TODO (T48588859): Restructure this target to align with dir structure: "react/nativemodule/..." diff --git a/packages/react-native/ReactCommon/react/debug/React-debug.podspec b/packages/react-native/ReactCommon/react/debug/React-debug.podspec index 7c2d0d65ae64f1..933ace4d4d6fd5 100644 --- a/packages/react-native/ReactCommon/react/debug/React-debug.podspec +++ b/packages/react-native/ReactCommon/react/debug/React-debug.podspec @@ -32,6 +32,6 @@ Pod::Spec.new do |s| if ENV['USE_FRAMEWORKS'] s.module_name = "React_debug" - s.header_mappings_dir = "../.." + s.header_mappings_dir = File.absolute_path("../..") end end diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec index 8824ba73561bf3..00f5c923fe3dcc 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec @@ -37,7 +37,7 @@ Pod::Spec.new do |s| "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", "GCC_WARN_PEDANTIC" => "YES" } if ENV['USE_FRAMEWORKS'] - s.header_mappings_dir = './' + s.header_mappings_dir = File.absolute_path('./') end s.source_files = "ReactCommon/**/*.{mm,cpp,h}" diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec index ddccfded01041d..f1143cea212b40 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec @@ -37,7 +37,7 @@ Pod::Spec.new do |s| "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", "GCC_WARN_PEDANTIC" => "YES" } if ENV['USE_FRAMEWORKS'] - s.header_mappings_dir = './' + s.header_mappings_dir = File.absolute_path('./') end diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/React-graphics.podspec b/packages/react-native/ReactCommon/react/renderer/graphics/React-graphics.podspec index c4428e0346705f..4111d290bdf673 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/React-graphics.podspec +++ b/packages/react-native/ReactCommon/react/renderer/graphics/React-graphics.podspec @@ -45,7 +45,7 @@ Pod::Spec.new do |s| if ENV['USE_FRAMEWORKS'] s.module_name = "React_graphics" - s.header_mappings_dir = "../../.." + s.header_mappings_dir = File.absolute_path("../../..") header_search_paths = header_search_paths + ["\"$(PODS_TARGET_SRCROOT)/platform/ios\""] end diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec b/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec index 34ad40c6fe5c61..856b847e23d0af 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec @@ -42,7 +42,7 @@ Pod::Spec.new do |s| if ENV['USE_FRAMEWORKS'] s.module_name = "React_ImageManager" - s.header_mappings_dir = "./" + s.header_mappings_dir = File.absolute_path("./") header_search_paths = header_search_paths + [ "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\"", "\"$(PODS_ROOT)/DoubleConversion\"", diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec index 2756131fa11588..77aafd0d0e07b8 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec @@ -47,7 +47,7 @@ Pod::Spec.new do |s| if ENV['USE_FRAMEWORKS'] s.module_name = "React_runtimescheduler" - s.header_mappings_dir = "../../.." + s.header_mappings_dir = File.absolute_path("../../..") end s.dependency "React-jsi" diff --git a/packages/react-native/ReactCommon/react/utils/React-utils.podspec b/packages/react-native/ReactCommon/react/utils/React-utils.podspec index 795be868379d61..18370236534029 100644 --- a/packages/react-native/ReactCommon/react/utils/React-utils.podspec +++ b/packages/react-native/ReactCommon/react/utils/React-utils.podspec @@ -48,7 +48,7 @@ Pod::Spec.new do |s| if ENV['USE_FRAMEWORKS'] s.module_name = "React_utils" - s.header_mappings_dir = "../.." + s.header_mappings_dir = File.absolute_path("../..") end s.dependency "RCT-Folly", folly_version