From 08ef7b18d270914c59561873532b5d6d06c4d97b Mon Sep 17 00:00:00 2001 From: Mathieu Acthernoene Date: Wed, 17 Jun 2026 08:31:06 -0700 Subject: [PATCH] Fix React-RCTAnimatedModuleProvider build failures (#57252) Summary: `React-RCTAnimatedModuleProvider` could fail to build because of two issues in its podspec: - **Missing space between compiler flags**: `new_arch_enabled_flag` and `js_engine_flags()` were concatenated without a separator, producing a single malformed flag (e.g. `-DRCT_NEW_ARCH_ENABLED=1-DUSE_HERMES=1`) instead of two distinct flags. - **Missing Yoga dependency**: the pod uses Yoga headers (through `React-Fabric/animated`) but did not declare the `Yoga` dependency nor its private header search path, leading to a `'yoga/...' file not found` build error. This adds the missing space, declares the `Yoga` dependency, and adds `$(PODS_ROOT)/Headers/Private/Yoga` to the header search paths. ## Changelog: [IOS] [FIXED] - Fix React-RCTAnimatedModuleProvider build by adding the missing Yoga dependency and a missing space between compiler flags Pull Request resolved: https://github.com/react/react-native/pull/57252 Test Plan: Without these changes, building the pod fails with errors such as: ``` fatal error: 'yoga/Yoga.h' file not found ``` and the macro flags being mangled into a single unrecognized define. - Run `pod install` and build the app on iOS. - Confirm `React-RCTAnimatedModuleProvider` compiles and the build succeeds. Reviewed By: zeyap Differential Revision: D108885720 Pulled By: cortinico fbshipit-source-id: b527570857d704b802382334a413ab15879ba13a --- .../React-RCTAnimatedModuleProvider.podspec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactApple/RCTAnimatedModuleProvider/React-RCTAnimatedModuleProvider.podspec b/packages/react-native/ReactApple/RCTAnimatedModuleProvider/React-RCTAnimatedModuleProvider.podspec index ac0a79b23e2..c7b78626893 100644 --- a/packages/react-native/ReactApple/RCTAnimatedModuleProvider/React-RCTAnimatedModuleProvider.podspec +++ b/packages/react-native/ReactApple/RCTAnimatedModuleProvider/React-RCTAnimatedModuleProvider.podspec @@ -18,11 +18,12 @@ end is_new_arch_enabled = ENV["RCT_NEW_ARCH_ENABLED"] != "0" new_arch_enabled_flag = (is_new_arch_enabled ? " -DRCT_NEW_ARCH_ENABLED=1" : "") -other_cflags = "$(inherited) " + new_arch_enabled_flag + js_engine_flags() +other_cflags = "$(inherited) " + new_arch_enabled_flag + " " + js_engine_flags() header_search_paths = [ "$(PODS_TARGET_SRCROOT)/../../ReactCommon", "$(PODS_ROOT)/Headers/Private/React-Core", + "$(PODS_ROOT)/Headers/Private/Yoga", "$(PODS_ROOT)/Headers/Public/ReactCommon", ] @@ -52,6 +53,7 @@ Pod::Spec.new do |s| s.dependency "React-Core" s.dependency "React-featureflags" s.dependency "React-Fabric/animated" + s.dependency "Yoga" add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])