When building my project using Xcode, it said "Unable to prepare iPhone for development. Please check the connection to the device, and review all errors in the Devices and Simulators window." And in the Devices and Simulators window, it said "Failed to prepare device for development. If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device."
I am using Xcode 13.1 and iOS 15.3 on an iPhone 13 Pro.
This problem used to happen very often to me (3 times a day usually). In the past, after I restarted the iPhone, it would be fine. But this time, even after I restarted my iPhone multiple times, it still didn't work. This problem has been lasting for a week. Could anyone help me to fix it?