Connect — disconnect — connect — disconnect — con…
It was driving me crazy. I saw that my iPhone was charging and then got disconnected. I blamed my cable and went for a new one. Result was the same: different cable, same shit. I used to have a sign on my door that said: “Same shit, different day” …
I googled and didn’t find an answer immediately. But this blog saved my day. It gave the perfect solution for me:

So hopefully someone googles this and doesn’t buy useless extra cables 🙂