Failed to prepare device for development. XCode 13.2.1, iOS 15.1

Solution 1:

This answer helped me where you:

  • Open XCode and device manager
  • Connect the device
  • Shutdown the device while being connected
  • Power on the device
  • Wait till the device is processed by XCode in devices and simulator window