Before you begin
Connect the Mac running Xcode and the device to the same network.
Choose Window > Devices and Simulators, then in the window that appears, click Devices.
In the left column, the device should appear under Connected.
On the Mac, open Terminal.
Type ping
followed by a space and the device’s IP address.
If the Mac can see the device, the output of this command looks like:
> ping 10.0.1.2
PING 10.0.1.2 (10.0.1.2): 56 data bytes
64 bytes from 10.0.1.2: icmp_seq=0 ttl=64 time=97.413 ms
64 bytes from 10.0.1.2: icmp_seq=1 ttl=64 time=141.892 ms
If there is an error, the output looks like:
Request timeout for icmp_seq 0
If you can’t ping the device, then the ICMP is blocked or there is some other connectivity issue. Use an Ethernet cable to connect to the device.
Communication to network devices uses port 62078. Some networks block certain ports. You may need to check your network settings, or ask your system administrator to open this port.
Connect the device to the same network using an Ethernet cable.
For an Apple TV, connect using the Ethernet port in the back of the device.
For an iOS device, use the Lightning to USB Camera Adapter and a USB to Ethernet adapter.