The Wire · Showcase
REACT NATIVE SHIPS SWIFTPM SUPPORT, REWRITES HEADER STACK FROM SCRATCH
By RepoJournal · Filed · About Meta
React Native's iOS build system just got rebuilt to work natively with Swift Package Manager, eliminating years of Clang VFS overlay workarounds that have been slowing down compiles and fragmenting the header namespace.
The SwiftPM support [1] lands as the capstone of a three-PR stack that fundamentally reorganizes how React Native's C++ headers are packaged and discovered at build time. First, the team removed the Clang VFS overlay [2] that was layering CocoaPods-style namespacing on top of framework conventions, replacing it with a pure ReactNativeHeaders framework module map. Then they published ReactNativeDependenciesHeaders [3] as a self-contained SwiftPM artifact, giving every header namespace exactly one physical home instead of the scattered CocoaPods conventions that made integration painful. The final piece [1] wires it all together so iOS apps can depend on React Native via SwiftPM directly. This also exposed header validation regressions that are being cleaned up [6] as CFNetwork gets reclassified as a system framework. On the React side, microtask gating in Fabric is being simplified [4] now that React Native enables microtasks by default across the board. Meanwhile, the synthetic event layer is getting standards-compliant [5], with cancelBubble now properly exposed on the Event interface rather than tracked separately in legacy code.
Action items
- → Review and test SwiftPM integration [ref:7] before adopting in new iOS projects facebook/react-native [plan]
- → Update header imports if you maintain internal React Native forks using the old VFS overlay facebook/react-native [plan]
- → Monitor header validation step in CI as CFNetwork reclassification [ref:3] rolls out facebook/react-native [monitor]
References
- [1] feat(iOS) swiftpm support in iOS (#57332) facebook/react-native
- [2] refactor(ios): remove clang VFS overlay, resolve headers via new ReactNativeHeaders framework (#57285) facebook/react-native
- [3] feat(iOS): ReactNativeDependenciesHeaders sidecar + pure-RN ReactNativeHeaders, published to Maven (#57442) facebook/react-native
- [4] Clean up flag to enable microtasks in RN ↗ facebook/react
- [5] Add `cancelBubble` to `Event` and adopt it in LegacySyntheticEvent (#57561) facebook/react-native
- [6] fix(iOS): classify CFNetwork as a system framework in the header include-health ratchet (#57565) facebook/react-native