Solved: Using Ionic LiveReload on a Physical iOS Device
Ionic CLI has the option of starting your app with live updates as you make changes in your code.
Starting your app using live reload on a physical iOS device:
- Plug your phone in using the USB cable.
- At the Mac Terminal, cd into your app's folder
- Type: ionic run ios --device --livereload
Potential problems and troubleshooting steps:
- App hangs at the launch screen and Terminal shows this error: "Failed to load webpage with error: Could not connect to the server.":
- Unplug the iOS device from the USB cable.
- Double-tap the home button on the iOS device.
- Swipe the app upwards to close it.
- Make sure the Wifi is enabled on the iOS device and that it is connected to the same network that your Mac is connected to.
- Plug the device back into the USB cable.
- In Terminal on the Mac, press CMD+C to kill the process.
- Repeat the steps listed at the top of this article.
- Double-tap the home button on the iOS device
- Swipe the app upwards to close it
- Launch the app again from the iOS home screen
- You should be back at the home screen of your app now, with --livereload still connected.