1
react-native-cli: 2.0.1
react-native: 0.47.1
react: 16.0.0-alpha.12

I finally managed to hook up an iOS device (iPhone 4S) to xcode and build my react native code to the device.

Shaking the phone gives me the following options:

enter image description here

as you can see there is no Live Reload option and the Reload doesn't work. I am forced to build it from xcode every single time I make a change.

Can anybody help me getting the Reload to work and enable Live Reload?

I have struggled with this for many days now - because it seems to change all the time and the only answers I have been able to find are obsolete.


Could the issue be that my iPhone runs iOS 9.3.5? _____

Norfeldt
  • 8,272
  • 23
  • 96
  • 152
  • If you launch your app with Xcode, then shutdown your app ( double click on home button on iPhone and swipe the app to the top ) and reopen it you still have the same menu ? – Gabriel Diez Aug 12 '17 at 23:19
  • I followed your instructions (with the iPhone still connected via USB and xcode still open) and it did not change anything. – Norfeldt Aug 13 '17 at 09:54
  • Your computer and your iPhone are connected to the same wifi ? Try to launch your app without the usb plugged please – Gabriel Diez Aug 13 '17 at 09:55
  • Yes they are connected to the same wifi (there is no SIM card in the phone). I just tried what you suggested and it's still the same. – Norfeldt Aug 13 '17 at 10:07
  • Do I need to change something in the Wifi settings of the phone. Noticed that there is a HTTP PROXY option [Off (current) | Manual | Auto] – Norfeldt Aug 13 '17 at 10:10
  • My Http proxy option is off too. I have the same menu as you when my app isn't connected to the running packager on my terminal who is responsable of the live reload. When you are reloading your app, there is something write at the top. Do that say "loading from 192.168.1.15" or "loading from pre-bundled file" ? – Gabriel Diez Aug 13 '17 at 10:15
  • It says `Loading from pre-bundled file...` – Norfeldt Aug 13 '17 at 10:28
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/151821/discussion-between-norfeldt-and-gabriel-diez). – Norfeldt Aug 13 '17 at 10:28
  • possible duplicate of https://stackoverflow.com/questions/38772373/how-to-enable-live-reload-in-ios-device-running-react-native-app – Bat Aug 14 '17 at 08:48
  • This is RN 0.47 and not 0.30 like the old post... – Norfeldt Aug 14 '17 at 19:07

1 Answers1

1

Had the same issue here, and fixed it like that:

  1. Make sure wifi is disabled on the iDevice

  2. Open System Preferences by selecting System Preferences from the Apple menu, or by clicking the System Preferences icon in the Dock.

  3. When the System Preferences window opens, click the Sharing preference pane.

  4. The left side of the Sharing preference pane lists the services that you can share. Place a check mark in the Internet Sharing box.

  5. Then Check "USB YourDevice/iPhone/iPod/iPad"

You are Done! (working here on v0.47.1)

Check that you can access internet/network on your device, then run your app form XCode in Debug mode. Now, you should have the green bar on top loading from the packager and you can debug remotely.

  • Thank you so much for trying to help me out! My issue is however that when I try to follow your instructions it only allows Thunderbolt Bridge and not USB 3 port (macbook pro 2015) - the iphone 4s cable is 30 pins to USB and not thunderbolt... – Norfeldt Aug 23 '17 at 21:46
  • Ohh I see! But the concept is the same. Once you find a way to share your connection (ex. by being in the same wifi) You will then, can debug remotely easily. Don't forget to change the localhost then in the file RCTWebSocketExecutor.m and edit the line: NSString *host = [[_bridge bundleURL] host] ?: @"localhost"; by replacing localhost with your IP address. – Patrick Loureiro Aug 24 '17 at 09:21
  • Once again. Thank you so much to taking the time to help me out. It's however not possible to share from WIFI to WIFI. Tried to connect the phone via bluetooth - but the connection gets broken once it's established.. – Norfeldt Aug 24 '17 at 21:25
  • I can still use xcode to refresh to code ("manually") - so I'm not lost, but without the awesome feature of reload. – Norfeldt Aug 24 '17 at 21:26
  • ⚠️ if you don't see "USB YourDevice/iPhone/iPod/iPad" option, just reconnect your device a few times, it will show up! – stkvtflw Jul 03 '20 at 07:22