Xcode doesn't support iOS 14.5.1
For example the one for iOS 14.5 is located at is Xcode.app/Contents/Developer/iPhoneOS.platform/DeviceSupport/14.5
You can download the xip for Xcode 12.5 from here: https://developer.apple.com/download/more/?=xcode and extract that folder from the XCode.app inside it and move it to your installed XCode.app.
There are also publicly hosted GitHub repositories with these folders, a quick search will turn them up. It is obviously better to extract it from the official source yourself, but I think the archives are signed anyways.
robske_110 missed "Platforms" in the directory path: It's Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/14.5
Be sure to use the Finder to copy the directory. I used the command line the first time (sudo cp -r …), and Xcode didn't like it. I don't remember if it was a different error message than the unsupported iOS version, but it didn't work. (Yes, I quit Xcode before copying, then started Xcode again.) After doing the same thing through the Finder, it worked. The next time running the app from Xcode still took a little extra time; it said something about copying cache files to my phone; I assume that's related to the 14.5 stuff I just added with the above instructions.
Thanks, all (especially robske_110) for the help!
MBP 2016 running MacOS 11.3.1 (Big Sur)
iPhone XS running release iOS 14.5.1
Xcode 12.5
...and I get the "Failed to prepare device for development" error. Frustrating!
Xcode 12.5 won't run on Catalina but I have a super old Mac from 2012 so this won't be able to upgrade to MacOS 11.0 Big Sur. Any suggestion? :( I already updated my IOS
Similar problem...my iPhone/iPad auto updated, and now it effectively turned my 27 inch 2013 iMac into a useless development tool. This is beyond frustrating. One expensive OS upgrade just stalled years of work..
In fact. This is a too expensive environment for casual developers like me. :-(
Apple should learn a lot of thing from Microsoft and Google About backward compatible
in windows 10 or 11 you can install any version of visual studio since 1996