Skip to content

Commit

Permalink
Update ios pod post_install logic for detecting if hermes is enabled (#…
Browse files Browse the repository at this point in the history
…41286)

Summary:
Follow up of #41284 (comment)

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: #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
  • Loading branch information
gabrieldonadel authored and huntie committed Jan 2, 2024
1 parent cadcf54 commit 2c8aa68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-native/scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2c8aa68

Please sign in to comment.