Skip to content

Commit 6c165da

Browse files
committed
[LOCAL] Enable Network panel on Android and iOS
1 parent 6ab7738 commit 6c165da

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/react-native/ReactCommon/react/networking/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,10 @@ target_link_libraries(react_networking
2121
jsinspector_tracing
2222
react_performance_timeline
2323
react_timing)
24+
25+
if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
26+
target_compile_options(react_networking PRIVATE
27+
-DREACT_NATIVE_DEBUGGER_ENABLED=1
28+
-DREACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1
29+
)
30+
endif ()

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ def self.set_gcc_preprocessor_definition_for_React_hermes(installer)
5959
def self.set_gcc_preprocessor_definition_for_debugger(installer)
6060
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-jsinspector", :debug)
6161
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-RCTNetwork", :debug)
62+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-networking", :debug)
6263
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-jsinspector", :debug)
6364
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-RCTNetwork", :debug)
65+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-networking", :debug)
6466
end
6567

6668
def self.turn_off_resource_bundle_react_core(installer)

0 commit comments

Comments
 (0)