Fix ENABLE_INSPECTOR ifdef not found during dev

Reviewed By: bnham

Differential Revision: D5680963

fbshipit-source-id: d38c4575387ba58e3819f5aa5c35078ed8ed3e87
This commit is contained in:
Paco Estevez Garcia 2017-08-24 10:39:13 -07:00 коммит произвёл Facebook Github Bot
Родитель 0b17524134
Коммит edf60ce640
3 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -48,6 +48,14 @@
#endif
#endif
#ifndef RCT_ENABLE_INSPECTOR
#if RCT_DEV && __has_include(<React/RCTInspectorDevServerHelper.h>)
#define RCT_ENABLE_INSPECTOR 1
#else
#define RCT_ENABLE_INSPECTOR 0
#endif
#endif
#if RCT_DEV
#define RCT_IF_DEV(...) __VA_ARGS__
#else

Просмотреть файл

@ -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