Skip to content

[0.87] Stamp the React Native version in prebuilt iOS core artifacts #1352

Description

@cipolleschi

Target Branch

0.87

Link to commit or PR to be picked

react/react-native@95df500

Description

This fixes a build-breaking issue in the prebuilt iOS core artifacts. The compose job currently ships ReactNativeVersion.h with the 1000.0.0 development sentinel even though the compiled binary and npm package have the correct release version. With the materialized prebuilt headers used by 0.87, third-party libraries read this incorrect header and compile the wrong version-gated code paths.

For example, react-native-unistyles sees REACT_NATIVE_VERSION_MINOR as 0, selects a removed pre-0.81 API path, and fails to build with a shadowNodeFromValue error. This affects consumers of the prebuilt React Native core and makes the artifact internally inconsistent.

The fix composes ReactNativeVersion.h from the already-stamped headers produced by the slice build, while continuing to source every other header from the compose checkout. It also invalidates pre-fix caches and adds a verification gate that prevents release or nightly artifacts from shipping the development sentinel again.

This is appropriate for 0.87 because it fixes the correctness of the release artifact and restores compatibility with third-party libraries, matching the support policy criteria for bugs in the core React Native experience and APIs used by third-party libraries.

Validation covered local composition, the sentinel detection gate, a fresh React Native nightly app with react-native-unistyles@3.3.0 on Xcode 26.3 in prebuilt mode, and the Expo prebuilt harness on Xcode 26.3 and 26.6. Stock artifacts reproduced the failure; the correctly stamped header resolved it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type Pick RequestPick requests to include commits inside a React Native release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions