Failed to prepare device for development

I am running xcode Version 13.2.1 (13C100) macOS Big Sur Version 11.6.7 (20G630)

and I am trying to connect my phone to test my app that I am working on my phone is iPhone 8 Version 15.5 (19F77)

Every time I try to connect I get the following message: This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your mac and device in order to correctly detect compatibility.

I tried restarting the mac and the phone, but that did not help. Is my device incompatible or am I doing something wrong?

Answered by SergioDCQ in 719124022

I thought I replied, but anyway:

I found this answer, and it has many solutions. The one that worked for me was "doing a hard restart of my iPhone." Ashamed I didn't think of trying that first.

I just started getting this error, and I know it worked yesterday on my iPhone 13 Max Pro, iOS 15.4.1

My Xcode app is set for a minimum deployment of 14.x. But even changing it to match the iPhone doesn't solve this problem.

Would love to know what happened all of a sudden.

Accepted Answer

I thought I replied, but anyway:

I found this answer, and it has many solutions. The one that worked for me was "doing a hard restart of my iPhone." Ashamed I didn't think of trying that first.

Failed to prepare device for development
 
 
Q