androidreact-nativemetro-bundler

How to specify Metro Bundler IP adress in my React-Native dev-environment?


Not sure if this is even possible, but here goes:

Setup

react-native run-android

The Problem

The remaining piece:

So after all this, here's my question:

Note: This is not a problem with the application code, I need some way to change the source that the application hits when it's looking for the Metro Bundler service.


Solution

    1. Open React Native application
    2. Shake the device 2-3 times
    3. Dev Settings → Debug server host -> IP address with 8081 port and reload, that's it

    In Emulator / Simulator to open Dev settings you can use the command CTRL + M. Make sure it's not Release build (not Signed APK)