Repository navigation
[iOS] Keep subfolders and fix missing includes in the prebuilt headers package - #60295
Merged
Merged
Conversation
chrfalch
marked this pull request as ready for review
November 26, 2026 17:31
…package
The prebuilt ReactNativeHeaders package flattened the animated/ and
mounting/stubs/ subfolders, left out observers/{intersection,mutation,resize},
shipped five Android textinput headers, and contained six headers that
did not compile alone because of missing includes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The observers/{intersection,mutation,resize} headers and the
nativemodule Native*Observer.h headers that include them are private
(PrivateGuard.h) and used only from .cpp files. Skip their podspecs
instead of shipping them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrfalch
force-pushed
the
ios-prebuild-header-layout
branch
from
November 26, 2026 18:29
3c313a0 to
6e13b52
Compare
cipolleschi
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Some headers in the prebuilt iOS headers package (
ReactNativeHeaders) do not compile on their own. An app or library that uses the prebuilt React Native core can hit a broken include. This PR fixes the script that builds the package and adds 6 missing includes. No headers move in the source tree.What changes in the package:
animated/headers now keep their subfolders (nodes/,drivers/,event_drivers/,internal/). This matches theheader_mappings_dirin React-Fabric.podspec. Before, they were copied flat, so their own includes broke.mounting/stubs/headers now keep thestubs/subfolder, for the same reason.react/nativemodule/{intersection,mutation,resize}observer/Native*Observer.h) are no longer in the package. They included observer headers that were missing from the package, so they did not compile. They are private, and only React Native's own.cppfiles use them. Removing them fixes the broken includes without exposing the privateobservers/{intersection,mutation,resize}headers.textinput/platform/android) are no longer in the iOS package.iostextinput/propsConversions.hbridging/Dynamic.hcore/ReactEventPriority.hcore/conversions.hgraphics/BlendMode.htextlayoutmanager/RCTTextPrimitivesConversions.hThe accepted-problems list for the header check (
headers-include-baseline.json) goes from 27 entries to 14.This PR exposes no new private headers. Each React Native header is marked public, for-frameworks or private (
scripts/cxx-api/README.md). The headers that move to subfolders were all in the package before, and none of the added includes makes a public header depend on a private one.Breaking change
Before this PR, the prebuilt package also had the moved animated and mounting headers at a flat path, for example
react/renderer/animated/AnimatedNode.h. Now they are only at their subfolder path, for examplereact/renderer/animated/nodes/AnimatedNode.h. React Native's own source code and CocoaPods already use the subfolder path for the animated headers.We searched public GitHub code for all 31 old flat paths and found 351 matches. Every match was a copy of React Native itself. We found no library or app that uses these paths. If one does, the fix is to include the subfolder path instead.
Changelog:
[IOS] [BREAKING] - Prebuilt headers package: keep the
animated/andmounting/stubs/subfolders, drop the private observer module headers, drop the Android textinput headers, and fix 6 headers that did not compile aloneTest Plan:
New Jest test
packages/react-native/scripts/ios-prebuild/__tests__/headers-test.js. It runs the real header config on the source tree.yarn test packages/react-native/scripts/ios-prebuild: 11 suites, 113 of 113 tests pass.yarn flow-checkandyarn lintpass. The changed C++ files pass clang-format.Package built from source and checked:
headers-verify.jsprintsALL GATES PASSED.We compiled each stable-API header alone against that package. Before the 6 include fixes, 385 of 390 compiled. After them, all 390 compile.
Not run: a Release build of the package.