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
Well if you want to get the list of available destinations then call xcodebuild and pass in the command line option -showdestinations, and it will print valid options for you to pick from:
-showdestinations
xcodebuild -showdestinations -workspace Register.xcworkspace -scheme ThatTestTarget