Skip to content

Commit 7c95d68

Browse files
cipolleschimeta-codesync[bot]
authored andcommitted
Enable Network Panel on Android and cocoapods (#54670)
Summary: Pull Request resolved: #54670 This is a port back to main of [this commit](eb78fba) which landed in 0.83 to make sure that the network panel is enabled for Android and for iOS builds from source. ## Changelog: [Internal] - Reviewed By: cortinico Differential Revision: D87864636 fbshipit-source-id: 7176407ec3af1407bf4bde9e9552dea7443ad92e
1 parent 20550c4 commit 7c95d68

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)