Skip to content

[0.84] fix(ios): load RCTDefines.h first in React umbrella + drop submodule wildcard so RCT_* macros stay visible #1305

@wneel

Description

@wneel

Target Branch

0.84

Link to commit or PR to be picked

facebook/react-native#56862

Description

This fixes a regression introduced in 0.84 by the new default RCT_USE_PREBUILT_RNCORE=1. Under use_frameworks! (Expo's default, and required by firebase-ios-sdk), Clang auto-modularizes <React/...> imports against the prebuilt React.xcframework. The previous umbrella ordering plus the module * { export * } wildcard in the modulemap meant RCTDefines.h was parsed in a sibling submodule, so its #defines (RCT_EXTERN, RCT_EXPORT_METHOD, RCT_CONCAT, etc.) did not propagate to consumer translation units. Any pod that uses those macros (notably React Native Firebase: Auth, Storage, Messaging, Firestore) fails to compile with cascading expected ':' / unknown identifier errors.

The fix reorders the umbrella so RCTDefines.h loads first and drops the submodule wildcard, keeping the React module a single parse context. 2 files changed, 5 lines net.

Impact: broad. The current workaround is to set ENV['RCT_USE_PREBUILT_RNCORE'] = '0' plus pin RNFB as static, which most users hit through invertase/react-native-firebase#8883. Picking this into 0.84-stable lets use_frameworks! users adopt the 0.84 default cleanly without rolling back prebuilt RNCore.

Critical developer workflow: yes (Firebase on iOS via use_frameworks!).

Regression vs. previous release: yes (0.83 worked because RCT_USE_PREBUILT_RNCORE defaulted to 0).

Risk: low. Change is confined to the iOS prebuild templates; CI was green; no behavior change for non-use_frameworks! users.

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