In my case, the problem was caused by an external display connected via USB.
When I connected the iPhone 16 Pro with a USB cable, it appeared in Finder but not in XCode.
The external display was made by LG and I was using it in clamshell mode.
Once I disconnected the USB connection to the external display, XCode was able to recognize the iPhone.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: