Here's a solution that worked for me. A little context: I have Sonoma 14.4.1, Xcode 15.3 and iOS 17.5. The iPhone is not being recognized in Manage Run Destinations nor as a build target.
So, after I tried all the proposals here and from other forums, like clean builds, derived data delete, restart of all devices, use different cables and ports, turning off VPN and etc. The thing that got it solved for me is turning off the Wi-Fi of the phone and the laptop, then restarting both.
Do all that clearing stuff mentioned above (just in case).
Connect the iPhone to the Mac with cable.
Turn off the Wi-Fi on both iPhone and Mac.
Restart both devices and before enabling Wi-Fi, open Xcode and try to plug and unplug the phone until you see it in the list.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: