Skip to content

Commit 08ef7b1

Browse files
zoontekmeta-codesync[bot]
authored andcommitted
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: #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
1 parent bc20ec8 commit 08ef7b1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/react-native/ReactApple/RCTAnimatedModuleProvider/React-RCTAnimatedModuleProvider.podspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ end
1818

1919
is_new_arch_enabled = ENV["RCT_NEW_ARCH_ENABLED"] != "0"
2020
new_arch_enabled_flag = (is_new_arch_enabled ? " -DRCT_NEW_ARCH_ENABLED=1" : "")
21-
other_cflags = "$(inherited) " + new_arch_enabled_flag + js_engine_flags()
21+
other_cflags = "$(inherited) " + new_arch_enabled_flag + " " + js_engine_flags()
2222

2323
header_search_paths = [
2424
"$(PODS_TARGET_SRCROOT)/../../ReactCommon",
2525
"$(PODS_ROOT)/Headers/Private/React-Core",
26+
"$(PODS_ROOT)/Headers/Private/Yoga",
2627
"$(PODS_ROOT)/Headers/Public/ReactCommon",
2728
]
2829

@@ -52,6 +53,7 @@ Pod::Spec.new do |s|
5253
s.dependency "React-Core"
5354
s.dependency "React-featureflags"
5455
s.dependency "React-Fabric/animated"
56+
s.dependency "Yoga"
5557

5658
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
5759

0 commit comments

Comments
 (0)