Usually Xcode is too old for the device's iOS version, or the device is locked, untrusted or has Developer Mode off. Update Xcode, unlock the device, and re-pair it.
Xcode has to copy support files for the device's iOS version and start a debug connection. The step fails when any part of that handshake is missing.
- Version mismatch: a device on a newer iOS than your Xcode supports needs a newer Xcode (or its matching beta). Check Xcode > Settings > Components.
- Developer Mode: on iOS 16 and later, turn on Settings > Privacy & Security > Developer Mode and restart the device.
- Trust and lock state: unlock the device, tap Trust when asked, and keep the screen on during the first connection.
- Pairing: open Window > Devices and Simulators, remove the device, reconnect it and let Xcode pair again.
- Connection: try another cable or port, or connect by cable first before using wireless debugging.
- Last resort: restart the device, quit Xcode and delete the device's folder in ~/Library/Developer/Xcode/iOS DeviceSupport so Xcode rebuilds it.
Free disk space matters too, because the device support files for a new iOS version are large.
