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
This commit is contained in:
Mathieu Acthernoene authored and meta-codesync[bot] committed 2026-06-17 08:31:06 -07:00
1 parent bc20ec88eb
commit 08ef7b18d2
1 file changed
+3 -1
@@ -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"])