React Native - Running on Real Device


  1. https://facebook.github.io/react-native/docs/running-on-device.html

see React Native - Notes for description of debug and release modes.

iOS

Android

troubleshooting

notebook’s local IP is unreachable

IDK why it happens - maybe because of some router settings.

solution

use ngrok (not tested for Android - anyway localhost should work thanks to port forwarding):

  // app/api/ApiHelpers.js

  const LOCALHOST = Platform.OS === 'ios'
-   ? 'http://localhost:3000'
+   ? 'http://b27357e9.ngrok.io'
    : 'http://localhost:3000';