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
I had an entirely different problem. For some reason my app "Devices" was set to Universal build as opposed to iPhone. When I switched it to iPhone everything worked. Didn't need any extra settings.