Skip to content

Commit fb0d28c

Browse files
radko93meta-codesync[bot]
authored andcommitted
Fix React-CoreModules missing React-featureflags header path under use_frameworks! (#56591)
Summary: `React/CoreModules/RCTRedBox.mm` imports `<react/featureflags/ReactNativeFeatureFlags.h>` (added in #56574). Under `use_frameworks!` this fails to build: RCTRedBox.mm:19:9: 'react/featureflags/ReactNativeFeatureFlags.h' file not found Did not find header 'featureflags/ReactNativeFeatureFlags.h' in framework 'react' `React-CoreModules.podspec` uses plain `s.dependency "React-featureflags"`, which does not add the framework's Headers dir to `HEADER_SEARCH_PATHS`. Switching to `add_dependency(s, "React-featureflags")` preserves the same pod dependency and also adds the dependency header path, matching every neighboring dep (`React-debug`, `React-runtimeexecutor`, `React-jsinspector*`, etc.) in the same file. On `main`, this missing podspec-level header path is currently likely masked by the global `update_search_paths` entry added in #55679, which injects `React_featureflags.framework/Headers` into inherited header search paths for `use_frameworks!` builds. `0.83-stable` does not have that global entry, so the same podspec issue surfaces as a build regression in 0.83.7. This change fixes the dependency at the target that directly imports the header, so `React-CoreModules` no longer relies on a broad inherited header path. A cherry-pick to `0.83-stable` would fix the regression in 0.83.7. ## Changelog: [IOS] [FIXED] - Fix React-CoreModules failing to compile with `use_frameworks!` due to missing React-featureflags header path Pull Request resolved: #56591 Test Plan: RN 0.83.7 consumer app with `use_frameworks! :linkage => :static`, `RCT_USE_RN_DEP=1`: fails before this change. After the fix, `pod install` regenerates `React-CoreModules.debug.xcconfig` so `HEADER_SEARCH_PATHS` includes: ${PODS_CONFIGURATION_BUILD_DIR}/React-featureflags/React_featureflags.framework/Headers Verified locally that the `React-CoreModules` pod target builds after the fix: xcodebuild -project ios/Pods/Pods.xcodeproj \ -scheme React-CoreModules \ -configuration Debug \ -sdk iphonesimulator \ -derivedDataPath /tmp/rncoremodules-test \ CODE_SIGNING_ALLOWED=NO build Reviewed By: javache Differential Revision: D102328650 Pulled By: cipolleschi fbshipit-source-id: c25a7f5f733637e1d1604929665881b659fd3af3
1 parent f4f4b95 commit fb0d28c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react-native/React/CoreModules/React-CoreModules.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Pod::Spec.new do |s|
5151
s.dependency "React-Core/CoreModulesHeaders", version
5252
s.dependency "React-RCTImage", version
5353
s.dependency "React-jsi", version
54-
s.dependency "React-featureflags"
54+
add_dependency(s, "React-featureflags")
5555
s.dependency 'React-RCTBlob'
5656
add_dependency(s, "React-debug")
5757
add_dependency(s, "React-runtimeexecutor", :additional_framework_paths => ["platform/ios"])

0 commit comments

Comments
 (0)