From e851e73c1806a7b7b898a67716be87f42ced491a Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 24 Oct 2024 17:16:50 -0700 Subject: [PATCH] Add yoga to app search paths (#47195) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47195 When a user wants to create a Fabric Component i their app (not in a separate library) the app fails to build because: - The custom component has to inherit from `RCTViewComponentView` - `RCTViewComponentView` imports `ViewProps.h` - `ViewProps.h` imports `HostPlatformViewProps.h` - `HostPlatformViewProps.h` imports `BaseViewProps.h` - `BaseViewProps.h` imports `YogaStylableProps.h` which is a Yoga private header and the App has not visibility over it. It is also not possible to fix this issue with forward declaring the `YogaStylableProps`, because `BaseViewProps` inherit from the yoga's props, so the compiler needs the full declaration of `YogaStylableProps` to work This needs to be picked in 0.76 ## Changelog [iOS][Fixed] - Give apps access to Yoga headers Reviewed By: blakef Differential Revision: D64925222 fbshipit-source-id: e724076bbfb0a678948340dfab2ce609e6509533 --- .../Libraries/AppDelegate/React-RCTAppDelegate.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec index e29e1b25292181..b54f1e41af5c40 100644 --- a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec +++ b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec @@ -64,7 +64,7 @@ Pod::Spec.new do |s| "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(), "DEFINES_MODULE" => "YES" } - s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""} + s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Private/Yoga\""} s.dependency "React-Core" s.dependency "RCT-Folly", folly_version