Debug your app running on an iOS or tvOS device over a WiFi or other network connection.
Note: Network debugging requires Xcode 9.0 or later running on macOS 10.12.4 or later, and on the device, requires iOS 11.0 or later, or tvOS 11.0 or later.
Steps to set up an iPhone, iPad, or iPod touch
1. Choose Window > Devices and Simulators, then in the window that appears, click Devices.
2. Connect your device to your Mac with a lightning cable.
3. In the left column, select the device, and in the detail area, select Connect via network.
Xcode pairs with your device. If Xcode can connect with the device using a network, a network icon appears next to the device in the left column.
4. Disconnect your device.
Now you are ready for debugging over the network.
NOTE: MAC system and iPhone/iPad should share same network to use wireless debugging.
Set up a device for network debugging
Debug your app running on an iOS or tvOS device over a WiFi or other network connection.
Note: Network debugging requires Xcode 9.0 or later running on macOS 10.12.4 or later, and on the device, requires iOS 11.0 or later, or tvOS 11.0 or later.
Steps to set up an iPhone, iPad, or iPod touch
1. Choose Window > Devices and Simulators, then in the window that appears, click Devices.
2. Connect your device to your Mac with a lightning cable.
3. In the left column, select the device, and in the detail area, select Connect via network.
Xcode pairs with your device. If Xcode can connect with the device using a network, a network icon appears next to the device in the left column.
4. Disconnect your device.
Now you are ready for debugging over the network.
NOTE: MAC system and iPhone/iPad should share same network to use wireless debugging.
Reference: How to do wireless debug on Xcode 9 and iOS 11?