Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 17247

How to enable/disable Hermes based on Android/iOS Environment Variables in React Native?

$
0
0

Due to compatibility issues of Hermes (in RN +71.0) with React Native Debugger, I want to disable Hermes on Development and enable it on Production automatically, with Android/iOS specific ENV files.

In gradle.properties:

# Use this property to enable or disable the Hermes JS engine.# If set to false, you will be using JSC instead.hermesEnabled=true

In Podfile:

  use_react_native!(    .....    # Hermes is now enabled by default. Disable by setting this flag to false.    # Upcoming versions of React Native may rely on get_default_flags(), but    # we make it explicit here to aid in the React Native upgrade process.    :hermes_enabled => true,    .....  )

I'm not quite familiar with setting up Android/iOS environment variables, so I was wondering how I can use it to enable/disable Hermes based on my environment?


Viewing all articles
Browse latest Browse all 17247


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>