From 2c8aa686008db643c6f789b3e1e05dc015518bb0 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Thu, 2 Nov 2023 07:26:02 -0700 Subject: [PATCH] Update ios pod post_install logic for detecting if hermes is enabled (#41286) Summary: Follow up of https://github.com/facebook/react-native/pull/41284#issuecomment-1789516046 We should not rely on checking if the `React-hermes` pod is present to determine if hermes is enabled ## Changelog: [IOS] [CHANGED] - Update ios pod post_install logic for detecting if hermes is enabled Pull Request resolved: https://github.com/facebook/react-native/pull/41286 Test Plan: Run `use_react_native!(hermes => false)` should not add `USE_HERMES = true;` to `project.pbxproj` Reviewed By: blakef Differential Revision: D50899654 Pulled By: cipolleschi fbshipit-source-id: a5ab5b0117c61014e77b780c50bf349da92c6342 --- packages/react-native/scripts/react_native_pods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb index d29dca30081..5063116054e 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -294,7 +294,7 @@ def react_native_post_install( end fabric_enabled = ENV['RCT_FABRIC_ENABLED'] == '1' - hermes_enabled = ReactNativePodsUtils.has_pod(installer, "React-hermes") + hermes_enabled = ENV['USE_HERMES'] == '1' if hermes_enabled ReactNativePodsUtils.set_gcc_preprocessor_definition_for_React_hermes(installer)