iPhone not connected
Troubleshooting:
- plug in your iPhone.
- Open Xcode
- go to
window
->Devices and Simulators
- Right click on your device
- click
Unpair Device
and unplug it. - restart Xcode
- restart your iPhone.
- Connect your iPhone via USB
- run your app
- then unplug it, and it should run via the wifi again.
Set up
- Window -> Devices and Simulators
- Choose your device from the list.
- Tick the box for "connect via network."
In Window > Devices and Simulators, right click on your iPhone and "Connect with IP address", then enter the iPhone IP address and you're connected.
Turn off WIFI on Mac, and also on your iPhone too. Then turn on WIFI again on both devices.
I frequently face this issue since I don't use USB cable to build the app to my iPhone. So this is my usual way to resolve the connection problem.