From 56d15389fe42d0ff9a9a411863399d34cf42b3b6 Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Thu, 4 Jan 2024 17:02:55 -0800 Subject: [PATCH] iOS: Fixed up remaining RCT_USE_HERMES usage --> USE_HERMES Summary: https://github.com/facebook/react-native/pull/41625 cleaned up some usages, but there are some remaining ones. Changelog: [Fixed][iOS] Further cleaned up RCT_USE_HERMES Differential Revision: D52555309 --- .../Libraries/AppDelegate/RCTAppSetupUtils.h | 11 ++++------- .../Libraries/AppDelegate/RCTAppSetupUtils.mm | 8 ++++---- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h index af14ba93b9178b..095a002ee748db 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h +++ b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h @@ -15,18 +15,15 @@ #import -#ifndef RCT_USE_HERMES +#if USE_HERMES #if __has_include() #import -#define RCT_USE_HERMES 1 #elif __has_include() #import -#define RCT_USE_HERMES 1 -#else -#import -#define RCT_USE_HERMES 0 -#endif #endif +#else // USE_HERMES +#import +#endif // USE_HERMES #import diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm index 68b1f417995446..865cac04ff4a5b 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm @@ -107,11 +107,11 @@ void RCTAppSetupPrepareApp( [turboModuleManager moduleForName:"RCTDevMenu"]; #endif // end RCT_DEV -#if RCT_USE_HERMES +#if USE_HERMES return std::make_unique( #else return std::make_unique( -#endif // end RCT_USE_HERMES +#endif // USE_HERMES facebook::react::RCTJSIExecutorRuntimeInstaller( [turboModuleManager, bridge, runtimeScheduler](facebook::jsi::Runtime &runtime) { if (!bridge || !turboModuleManager) { @@ -128,11 +128,11 @@ void RCTAppSetupPrepareApp( RCTBridge *bridge, const std::shared_ptr &runtimeScheduler) { -#if RCT_USE_HERMES +#if USE_HERMES return std::make_unique( #else return std::make_unique( -#endif // end RCT_USE_HERMES +#endif // USE_HERMES facebook::react::RCTJSIExecutorRuntimeInstaller([bridge, runtimeScheduler](facebook::jsi::Runtime &runtime) { if (!bridge) { return;