This happened to me after I upgraded to 15.3 beta update. None of the suggestions on this or other similar questions worked for me. I noticed that when I unpaired the phone and then plugged it back in, it went straight to the error. Finally, I uninstalled XCode and re-installed it. When I connected the phone after installing XCode, I saw that it was preparing the phone for development afresh (as opposed to going straight to the error). I don't know if it was necessary to uninstall XCode but that's what worked for me.