diff --git a/packages/react-native/React/Inspector/RCTCxxInspectorPackagerConnectionDelegate.h b/packages/react-native/React/Inspector/RCTCxxInspectorPackagerConnectionDelegate.h index 79929126125..56e5f51c161 100644 --- a/packages/react-native/React/Inspector/RCTCxxInspectorPackagerConnectionDelegate.h +++ b/packages/react-native/React/Inspector/RCTCxxInspectorPackagerConnectionDelegate.h @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +#import + +#if RCT_DEV || RCT_REMOTE_PROFILE + #import "RCTCxxInspectorWebSocketAdapter.h" #import @@ -39,3 +43,5 @@ class RCTCxxInspectorPackagerConnectionDelegate std::chrono::milliseconds delayMs) override; }; } // namespace facebook::react::jsinspector_modern + +#endif diff --git a/packages/react-native/React/Inspector/RCTCxxInspectorPackagerConnectionDelegate.mm b/packages/react-native/React/Inspector/RCTCxxInspectorPackagerConnectionDelegate.mm index 6fa537dfd19..d6fb7b32d11 100644 --- a/packages/react-native/React/Inspector/RCTCxxInspectorPackagerConnectionDelegate.mm +++ b/packages/react-native/React/Inspector/RCTCxxInspectorPackagerConnectionDelegate.mm @@ -7,6 +7,8 @@ #import "RCTCxxInspectorPackagerConnectionDelegate.h" +#if RCT_DEV || RCT_REMOTE_PROFILE + #import namespace facebook::react::jsinspector_modern { @@ -42,3 +44,5 @@ void RCTCxxInspectorPackagerConnectionDelegate::scheduleCallback( }); } } // namespace facebook::react::jsinspector_modern + +#endif diff --git a/packages/react-native/React/Inspector/RCTCxxInspectorWebSocketAdapter.h b/packages/react-native/React/Inspector/RCTCxxInspectorWebSocketAdapter.h index a06d83413c6..8520d88d013 100644 --- a/packages/react-native/React/Inspector/RCTCxxInspectorWebSocketAdapter.h +++ b/packages/react-native/React/Inspector/RCTCxxInspectorWebSocketAdapter.h @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +#import + +#if RCT_DEV || RCT_REMOTE_PROFILE + #import #import #import @@ -15,3 +19,5 @@ - (void)send:(std::string_view)message; - (void)close; @end + +#endif diff --git a/packages/react-native/React/Inspector/RCTCxxInspectorWebSocketAdapter.mm b/packages/react-native/React/Inspector/RCTCxxInspectorWebSocketAdapter.mm index 95a039c61d4..ad4d1f6fb98 100644 --- a/packages/react-native/React/Inspector/RCTCxxInspectorWebSocketAdapter.mm +++ b/packages/react-native/React/Inspector/RCTCxxInspectorWebSocketAdapter.mm @@ -5,16 +5,17 @@ * LICENSE file in the root directory of this source tree. */ -#import +#import "RCTCxxInspectorWebSocketAdapter.h" + +#if RCT_DEV || RCT_REMOTE_PROFILE -#import #import +#import #import #import #import #import #import -#import "RCTCxxInspectorWebSocketAdapter.h" using namespace facebook::react::jsinspector_modern; @@ -87,3 +88,5 @@ NSString *NSStringFromUTF8StringView(std::string_view view) } @end + +#endif