Skip to content

Commit

Permalink
Back out "RNTester-ios / RCTAppDelegate > correctly check for USE_HER…
Browse files Browse the repository at this point in the history
…MES Flag" (#41626)

Summary:

In the codebase, we never set the RCT_USE_HERMES flag.

When we install the pods, we use the USE_HERMES flag and we set USE_HERMES as a build setting. So, the RCT_USE_HERMES flag will always be not set for the OSS.

https://pxl.cl/3RRxr

## Changelog:
[iOS][Fixed] - use the right USE_HERMES flag

## Facebook:
This change was incorrect as in OSS we never set the RCT_USE_HERMES flag, while we actually set the USE_HERMES one.

I will align the BUCK RNTester setup in the next diff of the stackog:

Reviewed By: dmytrorykun

Differential Revision: D51547810
  • Loading branch information
Riccardo Cipolleschi authored and facebook-github-bot committed Nov 27, 2023
1 parent b50a709 commit 99b898e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import <React/RCTSurfaceHostingProxyRootView.h>
#import <React/RCTSurfacePresenter.h>
#import <ReactCommon/RCTContextContainerHandling.h>
#if RCT_USE_HERMES
#if USE_HERMES
#import <ReactCommon/RCTHermesInstance.h>
#else
#import <ReactCommon/RCTJscInstance.h>
Expand Down Expand Up @@ -292,7 +292,7 @@ - (void)createReactHost

- (std::shared_ptr<facebook::react::JSRuntimeFactory>)createJSRuntimeFactory
{
#if RCT_USE_HERMES
#if USE_HERMES
return std::make_shared<facebook::react::RCTHermesInstance>(_reactNativeConfig, nullptr);
#else
return std::make_shared<facebook::react::RCTJscInstance>();
Expand Down

0 comments on commit 99b898e

Please sign in to comment.