Has your iPhone or iPad stopped charging? Check this first!

iPhone or iPad charging problems
When I come across an iPhone or iPad that appears to suffer from a charging problem -- it's not charging at all, it suffers from intermittent charging, or is charging much slower than usual -- the first thing that I now check is the cable. Specifically, the Lightning connector.
Why?
Here's why...
Lightning cable corrosion
Here is a genuine Apple Lightning cable. It's not even two years old, and it's never been outdoors, having lived a comfortable life in my office. But check out the corrosion on the conductor pads of the connector.
Yes, both sides
And the corrosion isn't limited to one side. The conducting pads are corroded on both sides of the connector.
OK, how to clean the connector
OK, so that's the problem. What's the solution?
I'm using two specialist items to tackle the problem:
- Deoxit D5 contact cleaner
- Fiberglass scratch brush
Don't have these? I'm not surprised, and you can substitute a pencil eraser for the scratch brush and some clean water (tap water works fine) for the contact cleaner. Some people recommend using vinegar or lemon juice, but I feel that the potential downsides (such as more corrosion on the cable, or getting acids inside your iPhone or iPad) makes these a poor choice.
Attentively, there are other specialist contact cleaners out there, or you can use a lubricant like WD-40.
Cleaning - Step 1
If you're using a cleaner, spray or drip a little on the connector.
Cleaning - Step 2
Gently clean the connector. Use light pressure -- don't got at it like an animal or you'll damage it -- and work along the conductor pads.

Looks like new
Here is the connector after a few minutes of cleaning. Looks like new.
And the other side
Here's the other side. If you've used a contact cleaner then this should help limit future build-up of corrosion.
It's a common problem
Think this is a rare issue? It's not. I checked the Lightning cables in use here at the PC Doc HQ and found that many of the heavily-used cables displayed this issue.
Here you can clearly see the layer of oxide on pin 5 (counting from the right) which is the pin that carries power to the iPhone.
USB-C to Lightning cables don't seem affected (yet)
What's interesting to note is that this issue doesn't seem to affect USB-C to Lightning cables because these seem to use a different metal for the connectors (which would make sense since these connectors are expected to carry more power than regular USB-A-to-Lightning cables.
However, only time will tell whether they are immune to this, or will suffer a similar issue following prolonged extensive use.