Skip to content

Add header_mappings_dir to React-Fabric.podspec animated subspec#56151

Open
zoontek wants to merge 1 commit intofacebook:mainfrom
zoontek:fix-animated-header-map
Open

Add header_mappings_dir to React-Fabric.podspec animated subspec#56151
zoontek wants to merge 1 commit intofacebook:mainfrom
zoontek:fix-animated-header-map

Conversation

@zoontek
Copy link
Contributor

@zoontek zoontek commented Mar 19, 2026

Summary:

When building React Native (0.85.0-rc.5) core from source (RCT_USE_PREBUILT_RNCORE=0), the React-Fabric/animated CocoaPods subspec flattens the event_drivers/ subdirectory headers because header_mappings_dir is not set.

CocoaPods' header_dir without header_mappings_dir places all matched headers directly under the specified directory, losing any subdirectory structure. This means event_drivers/EventAnimationDriver.h ends up at react/renderer/animated/EventAnimationDriver.h instead of react/renderer/animated/event_drivers/EventAnimationDriver.h.

The #include in NativeAnimatedNodesManager.h expects the full path with the event_drivers/ subdirectory, so the build fails with:

'react/renderer/animated/event_drivers/EventAnimationDriver.h' file not found
Screenshot 2026-03-19 at 13 54 29

This doesn't affect prebuilt (RCT_USE_PREBUILT_RNCORE=1) builds because the xcframework ships with a VFS overlay that maps headers correctly.

The fix adds header_mappings_dir to the animated subspec in React-Fabric.podspec, which tells CocoaPods to preserve the directory structure relative to react/renderer/animated.

Changelog:

[IOS] [FIXED] - Fix EventAnimationDriver.h not found when building React Native from source due to missing header_mappings_dir in React-Fabric/animated podspec

Test Plan:

  1. Set RCT_USE_PREBUILT_RNCORE=0 in your Podfile
  2. Run pod install
  3. Build the project — previously fails with 'react/renderer/animated/event_drivers/EventAnimationDriver.h' file not found
  4. With this fix, the build succeeds

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 19, 2026
@facebook-github-tools facebook-github-tools bot added p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Mar 19, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 19, 2026

@zeyap has imported this pull request. If you are a Meta employee, you can view this in D97295771.

@zeyap
Copy link
Contributor

zeyap commented Mar 19, 2026

thanks for fixing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants