From 4ab9da134c988db832b1a2daa90ce38bf8c419eb Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Wed, 24 Jul 2019 11:12:29 -0700 Subject: [PATCH] Fixes iOS packager connection not work (#25803) Summary: Macro `ENABLE_PACKAGER_CONNECTION` invalid because of `__has_include` can't find the header now. Leads to packager connection not work anymore. ## Changelog [iOS] [Fixed] - Fixes iOS packager connection not work Pull Request resolved: https://github.com/facebook/react-native/pull/25803 Test Plan: 1. Init a new project. 2. Run and input `curl http://localhost:8081/reload` in terminal. Reload operation can execute. Differential Revision: D16458384 Pulled By: TheSavior fbshipit-source-id: 27e7e02b5666a2131e995accd34e4da7bad42335 --- React/Base/RCTDefines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Base/RCTDefines.h b/React/Base/RCTDefines.h index cdfa6279867c4e..dfc7203d902a5c 100644 --- a/React/Base/RCTDefines.h +++ b/React/Base/RCTDefines.h @@ -55,7 +55,7 @@ #endif #ifndef ENABLE_PACKAGER_CONNECTION -#if RCT_DEV && __has_include() && !TARGET_OS_UIKITFORMAC +#if RCT_DEV && (__has_include("RCTPackagerConnection.h") || __has_include()) && !TARGET_OS_UIKITFORMAC #define ENABLE_PACKAGER_CONNECTION 1 #else #define ENABLE_PACKAGER_CONNECTION 0