I get this error when I trying to test an app.
A build only device cannot be used to run this target.
No supported iOS devices are available
Below is my way
Select project -> General -> Deployment Info -> Deployment Target -> choose a lower version
I tried almost anything above, including restarting XCode, none of them worked for me. I solved this problem by simply restarting my Mac. Yes, the classic solution.
A side note: This problem occurred to my XCode after it requested my Mac password from me, probably after an automatic upgrade.
I fixed this issue for emulator,
Firstly check your emulator list
Window > Devices and Simulators
after choose any device and click check OS Version
If you have only Apple Watch OS, You should download new IOS Simulator
and click download more simulator runtimes..
choose your correct IOS Simulator and download it.