From 803e15183a2a8b2685423ad1522d1ceaa732843c Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Thu, 9 Apr 2026 05:31:03 -0700 Subject: [PATCH] Add missing debugger define for React-RuntimeApple MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: 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 (D95566220) was misbehaving on iOS — code paths in `RCTHost.mm` were unexpectedly compiled out. See https://github.com/facebook/react-native/pull/56372. Changelog: [Internal] Differential Revision: D100157250 --- packages/react-native/Package.swift | 5 ++++- packages/react-native/scripts/cocoapods/utils.rb | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react-native/Package.swift b/packages/react-native/Package.swift index a5c88c5f1315..4271313cf8aa 100644 --- a/packages/react-native/Package.swift +++ b/packages/react-native/Package.swift @@ -412,7 +412,10 @@ let reactRuntimeApple = RNTarget( name: .reactRuntimeApple, path: "ReactCommon/react/runtime/platform/ios", excludedPaths: ["ReactCommon/RCTJscInstance.mm", "ReactCommon/metainternal"], - dependencies: [.reactNativeDependencies, .jsi, .reactPerfLogger, .reactCxxReact, .rctDeprecation, .yoga, .reactRuntime, .reactRCTFabric, .reactCoreModules, .reactTurboModuleCore, .hermesPrebuilt, .reactUtils] + dependencies: [.reactNativeDependencies, .jsi, .reactPerfLogger, .reactCxxReact, .rctDeprecation, .yoga, .reactRuntime, .reactRCTFabric, .reactCoreModules, .reactTurboModuleCore, .hermesPrebuilt, .reactUtils], + defines: [ + CXXSetting.define("REACT_NATIVE_DEBUGGER_ENABLED", to: "1", .when(configuration: BuildConfiguration.debug)) + ] ) let publicHeadersPathForReactCore: String = BUILD_FROM_SOURCE ? "includes" : "." diff --git a/packages/react-native/scripts/cocoapods/utils.rb b/packages/react-native/scripts/cocoapods/utils.rb index a903495d8458..c31332b9e6c4 100644 --- a/packages/react-native/scripts/cocoapods/utils.rb +++ b/packages/react-native/scripts/cocoapods/utils.rb @@ -61,6 +61,7 @@ def self.set_gcc_preprocessor_definition_for_debugger(installer) self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-jsinspectornetwork", :debug) self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-RCTNetwork", :debug) self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-networking", :debug) + self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-RuntimeApple", :debug) self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-jsinspector", :debug) self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-jsinspectornetwork", :debug) self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-RCTNetwork", :debug)