After updating react native from 0.26 to 0.29, live reload and hot code push items are missing in dev menu, so I have to manually reload the app every time. However, it's working in simulator. Have I messed up something while upgrading? I tried to update to 0.30, but didn't help.
Also, remote debugging from real device doesn't work, works only while running app in simulator. I get this error: Runtime is not ready for debugging, but I'm sure that packager server is running, it's not paused on breakpoint. Any ideas?
React version: 15.2.1 Watchman version: 4.5.0
Thanks :)
To debug the JavaScript code in Chrome, select "Debug JS Remotely" from the Developer Menu. This will open a new tab at http://localhost:8081/debugger-ui. Select Tools → Developer Tools from the Chrome Menu to open the Developer Tools.
In App Developer MenuOn Android emulator, you need to press command + M. Debug JS Remotely − Used for activating debugging inside browser developer console. Enable Live Reload − Used for enabling live reloading whenever your code is saved. The debugger will open at localhost:8081/debugger-ui.
Open the in-app Developer menu. Go to Dev Settings → Debug server host & port for device. Type in your machine's IP address and the port of the local dev server (e.g. 10.0.1.1:8081). Go back to the Developer menu and select Reload JS.
Figured out the needed configuration for make live reload work:
jsCodeLocation = [NSURL URLWithString: @"http://192.168.0.200:8081/index.ios.bundle?platform=ios&dev=true"];
note also that without "?platform=ios&dev=true" Hot Reload didn't work for me ("Unbalanced calls start/end" errors).
and in RCTWebSocketExecutor.m:
host = @"http://192.168.0.200";
192.168.0.200 - address of your computer. Both computer and device have to be in the same network. After that "Live Reload" item in "shake" dev menu appeared and also i started to see logs in server console:
and also "gotta be on the same wifi network" as @jmancherje mentioned
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With