If you get the following error:
*xcodebuild: error: Failed to build project WatsonCore with scheme WatsonCoreTests. Reason: A build only device cannot be used to run this target.*
Try this: it works for me in terms of general OS. The hardware device still needs to be specified.
/usr/bin/xcodebuild -scheme YourScheme -project YourProject -configuration Debug **-destination 'platform=iOS Simulator,name=iPhone 6'** clean build test CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO
source share