From d6163d7f43a753f24148450033491dfc9c5d0c36 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 96e878eaa0b452..26643a41652e90 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -237,7 +237,7 @@ def react_native_post_install( ReactNativePodsUtils.apply_mac_catalyst_patches(installer) if mac_catalyst_enabled 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)