[0.83] Fix React-CoreModules missing React-featureflags header path under use_frameworks!#56592
Merged
motiz88 merged 1 commit intofacebook:0.83-stablefrom Apr 24, 2026
Conversation
…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.
cipolleschi
approved these changes
Apr 24, 2026
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
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:
Companion to #56591 (main). Same one-line fix, cherry-picked cleanly —
React-CoreModules.podspecis byte-identical betweenmainand0.83-stable.React/CoreModules/RCTRedBox.mmimports<react/featureflags/ReactNativeFeatureFlags.h>(added in #56574). Underuse_frameworks!this fails to build on 0.83.7:React-CoreModules.podspecuses plains.dependency "React-featureflags", which doesn't add the framework's Headers dir toHEADER_SEARCH_PATHS. Switching toadd_dependency(s, "React-featureflags")does — matching every neighboring dep (React-debug,React-runtimeexecutor,React-jsinspector*, etc.) in the same file.On
mainthe symptom is masked by theupdate_search_pathspost-install hook (#55679 added a global entry forReact-featureflags), which was never backported to0.83-stable— which is why the bug surfaces here and not onmain. Landing this directly on0.83-stableunblocks 0.83.7use_frameworks!users without waiting for a main → stable cherry-pick.Changelog:
[IOS] [FIXED] - Fix
<react/featureflags/ReactNativeFeatureFlags.h>not found inRCTRedBox.mmwhen building withuse_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. GeneratedReact-CoreModules.debug.xcconfignow includes\${PODS_CONFIGURATION_BUILD_DIR}/React-featureflags/React_featureflags.framework/Headers.