A build only device cannot be used to run this target

add -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' to your xcodebuild


Maybe the Scheme has switched to a Generic device. Try to choose again the connected device from the Scheme menu:

Menu image


Below is my way

Select project -> General -> Deployment Info -> Deployment Target -> choose a lower version enter image description here