diff --git a/React/Base/RCTBridge.m b/React/Base/RCTBridge.m index 85ee29802..b4feb1d33 100644 --- a/React/Base/RCTBridge.m +++ b/React/Base/RCTBridge.m @@ -14,7 +14,7 @@ #import "RCTConvert.h" #import "RCTEventDispatcher.h" -#if ENABLE_INSPECTOR +#if RCT_ENABLE_INSPECTOR #import "RCTInspectorDevServerHelper.h" #endif #import "RCTJSEnvironment.h" @@ -258,7 +258,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) - (void)reload { - #if ENABLE_INSPECTOR + #if RCT_ENABLE_INSPECTOR // Disable debugger to resume the JsVM & avoid thread locks while reloading [RCTInspectorDevServerHelper disableDebugger]; #endif diff --git a/React/Base/RCTDefines.h b/React/Base/RCTDefines.h index b2681e38c..b3b017dff 100644 --- a/React/Base/RCTDefines.h +++ b/React/Base/RCTDefines.h @@ -48,6 +48,14 @@ #endif #endif +#ifndef RCT_ENABLE_INSPECTOR +#if RCT_DEV && __has_include() +#define RCT_ENABLE_INSPECTOR 1 +#else +#define RCT_ENABLE_INSPECTOR 0 +#endif +#endif + #if RCT_DEV #define RCT_IF_DEV(...) __VA_ARGS__ #else diff --git a/React/Modules/RCTDevSettings.mm b/React/Modules/RCTDevSettings.mm index 427f68564..b36bdecd0 100644 --- a/React/Modules/RCTDevSettings.mm +++ b/React/Modules/RCTDevSettings.mm @@ -42,9 +42,7 @@ static NSString *const kRCTDevSettingsUserDefaultsKey = @"RCTDevMenu"; #import "RCTPackagerConnection.h" #endif -#define ENABLE_INSPECTOR RCT_DEV && __has_include("RCTInspectorDevServerHelper.h") - -#if ENABLE_INSPECTOR +#if RCT_ENABLE_INSPECTOR #import "RCTInspectorDevServerHelper.h" #endif