Skip to content

[0.83] Fix React-CoreModules missing React-featureflags header path under use_frameworks!#56592

Merged
motiz88 merged 1 commit intofacebook:0.83-stablefrom
radko93:fix-react-coremodules-featureflags-0.83
Apr 24, 2026
Merged

[0.83] Fix React-CoreModules missing React-featureflags header path under use_frameworks!#56592
motiz88 merged 1 commit intofacebook:0.83-stablefrom
radko93:fix-react-coremodules-featureflags-0.83

Conversation

@radko93
Copy link
Copy Markdown
Contributor

@radko93 radko93 commented Apr 24, 2026

Summary:

Companion to #56591 (main). Same one-line fix, cherry-picked cleanly — React-CoreModules.podspec is byte-identical between main and 0.83-stable.

React/CoreModules/RCTRedBox.mm imports <react/featureflags/ReactNativeFeatureFlags.h> (added in #56574). Under use_frameworks! this fails to build on 0.83.7:

RCTRedBox.mm:19:9: 'react/featureflags/ReactNativeFeatureFlags.h' file not found

React-CoreModules.podspec uses plain s.dependency "React-featureflags", which doesn't add the framework's Headers dir to HEADER_SEARCH_PATHS. Switching to add_dependency(s, "React-featureflags") does — matching every neighboring dep (React-debug, React-runtimeexecutor, React-jsinspector*, etc.) in the same file.

On main the symptom is masked by the update_search_paths post-install hook (#55679 added a global entry for React-featureflags), which was never backported to 0.83-stable — which is why the bug surfaces here and not on main. Landing this directly on 0.83-stable unblocks 0.83.7 use_frameworks! users without waiting for a main → stable cherry-pick.

Changelog:

[IOS] [FIXED] - Fix <react/featureflags/ReactNativeFeatureFlags.h> not found in RCTRedBox.mm when building with use_frameworks!

Test Plan:

RN 0.83.7 consumer app with use_frameworks! :linkage => :static, RCT_USE_RN_DEP=1: fails before, builds end-to-end after. Generated React-CoreModules.debug.xcconfig now includes \${PODS_CONFIGURATION_BUILD_DIR}/React-featureflags/React_featureflags.framework/Headers.

…dules

RCTRedBox.mm in React-CoreModules imports <react/featureflags/ReactNativeFeatureFlags.h>
(added in facebook#56574, RedBox 2.0 iOS backport). With use_frameworks!, this file fails
to build with:

  'react/featureflags/ReactNativeFeatureFlags.h' file not found
  (Did not find header 'featureflags/ReactNativeFeatureFlags.h' in framework 'react')

React-CoreModules.podspec declared the React-featureflags dependency using plain
s.dependency, which only registers the pod. The React-Native-specific
add_dependency helper additionally appends the framework's Headers directory
(React_featureflags.framework/Headers) to HEADER_SEARCH_PATHS, which is required
for Clang to resolve <react/featureflags/...> under use_frameworks!.

This aligns React-featureflags with how React-debug, React-runtimeexecutor,
React-jsinspector*, React-utils, React-NativeModulesApple, ReactCommon and
React-RCTFBReactNativeSpec are already declared in the same podspec.

Verified: regenerated React-CoreModules.debug.xcconfig now contains
${PODS_CONFIGURATION_BUILD_DIR}/React-featureflags/React_featureflags.framework/Headers
and 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 Apr 24, 2026
@github-actions
Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: BREAKING

@motiz88 motiz88 merged commit 2ff85bc into facebook:0.83-stable Apr 24, 2026
27 checks passed
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. Pick Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants