Skip to content

Commit ea3fd3b

Browse files
committed
Add missing debugger define for React-RuntimeApple (facebook#56397)
The `React-RuntimeApple` pod/target was missing the `REACT_NATIVE_DEBUGGER_ENABLED` preprocessor define in both open source build configurations. Without this, the experimental-and-flagged `fuseboxFrameRecordingEnabled` feature was misbehaving on iOS — code paths in `RCTHost.mm` were unexpectedly compiled out. See facebook#56397.
1 parent 1e0f497 commit ea3fd3b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/react-native/Package.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,10 @@ let reactRuntimeApple = RNTarget(
400400
name: .reactRuntimeApple,
401401
path: "ReactCommon/react/runtime/platform/ios",
402402
excludedPaths: ["ReactCommon/RCTJscInstance.mm", "ReactCommon/metainternal"],
403-
dependencies: [.reactNativeDependencies, .jsi, .reactPerfLogger, .reactCxxReact, .rctDeprecation, .yoga, .reactRuntime, .reactRCTFabric, .reactCoreModules, .reactTurboModuleCore, .hermesPrebuilt, .reactUtils]
403+
dependencies: [.reactNativeDependencies, .jsi, .reactPerfLogger, .reactCxxReact, .rctDeprecation, .yoga, .reactRuntime, .reactRCTFabric, .reactCoreModules, .reactTurboModuleCore, .hermesPrebuilt, .reactUtils],
404+
defines: [
405+
CXXSetting.define("REACT_NATIVE_DEBUGGER_ENABLED", to: "1", .when(configuration: BuildConfiguration.debug))
406+
]
404407
)
405408

406409
let publicHeadersPathForReactCore: String = BUILD_FROM_SOURCE ? "includes" : "."

packages/react-native/scripts/cocoapods/utils.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def self.set_gcc_preprocessor_definition_for_debugger(installer)
6161
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-jsinspectornetwork", :debug)
6262
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-RCTNetwork", :debug)
6363
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-networking", :debug)
64+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-RuntimeApple", :debug)
6465
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-jsinspector", :debug)
6566
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-jsinspectornetwork", :debug)
6667
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-RCTNetwork", :debug)

0 commit comments

Comments
 (0)