I turned off Home Sharing in iTunes and on my iPhone. Then I restarted my iMac and my iPhone, I restarted iTunes, and I reconnected my iPhone to my iMac via the USB cable. I was asked again to grant access to my iPhone, and the iPhone asked again whether I trusted my iMac. I clicked on Continue on the iMac and then on Trust on the iPhone, I heard a second beep from the iPhone, and then the iPhone appeared listed as a device in iTunes. I didn't get the error message ( 'ITunes could not connect to this iPhone...') again. Then I turned on Home Sharing again. It seems to be working fine so far.