When my I connect my iPhone 7 to my MacBook Air (2015) with the original Apple USB cable it endlessly alternate between connected and disconnected, i.e. charging and not charging. Thus, the iPhone does not charge and even discharge. How to solve this issue?
Note: cables and connectors are fine. the cable works properly when charging with the power adapter. I also checked with other cables (MFI certified) and on all USB ports of the Mac and the issue is still present.
Also, as far as I remember, I had this issue since my first Apple devices (iPod Touch 2G with MacBook Air 2013) and it affected all my iPhones since (3GS, 4S, 7).
I also want to point out that this issue does not occur each time I plug my iPhone to my Mac but only sometimes and at random moments.