Xcode thinks iPad is not connected when deploying

Every now and then (say at least once a week, but possibly many times within a day) when I try to deploy to my iPad Xcode shows a sheet reading "iPad is not connected", even if it was working a minute earlier. I have reported this already several months ago, but apparently there is no fix for this yet. Usually, restarting Mac and/or iPad solves the issue, but it's really annoying when I have to do this repeatedly. Is there an easier workaround?

Xcode thinks iPad is not connected when deploying
 
 
Q