There are a few reasons that your iPhone might not be charging properly; as discussed in the article “Why won’t my iPhone charge?,” you might need to restart your phone, check the Lightning cable for kinks and breaks, and ensure your power source is working. If you check all those things and it still doesn’t work, it’s possible there’s enough debris in your port to keep the connector from making a solid connection.
Yes, your iPhone’s port can get so dirty it stops working. Anytime you put it in a pocket or bag, small bits of dirt, dust, and lint can find their way in. And when you insert the cable, that compresses and packs the dirt deep in the port. Eventually, it might become so fouled with debris that it stops working.
How to clean the iPhone’s Lightning port
You should get a flashlight, or work under a bright LED desk lamp — the brighter the better, since you need to see deep into the Lightning port.
And while you may want to start with compressed air, if you’re planning to insert anything into the port to pull out wedged-in dirt, there’s only one acceptable tool for the job: A toothpick. Never try to clean the Lightning port with anything harder than wood, like any sort of pin or metal rod. There are delicate electronics in the port, and ramming it with a sharp metal pin can permanently damage it.
1. Power off your iPhone completely. You can open the Settings app and then tap “General,” followed by “Shut Down.”
2. Holding the compressed air can upright (so it only blasts air, and doesn’t expel wet propellent) shoot a few short, controlled bursts into the port.
3. Turn your phone on and try to charge it again. If it’s still not working, it’s time to try the toothpick.
4. Again, with your phone turned off, gently insert the toothpick into the port and lightly scrape it against the inside wall of the port. Don’t apply pressure to the inside wall that’s closest to the front of the phone, because there are delicate pins there. Overall, it’s important to be gentle, because in addition to those pins, the sides are home to two small spring-mounted anchors that latch onto the Lightning port when you insert it (that’s why it “snaps” into place when you push the cable in). If you break anything, its charging days will be over permanently.
5. After using the toothpick for a while, give the port another burst of compressed air to help remove anything you’ve loosened.
6. If you push some dirt out, turn the phone back on and try to charge it.
If it works, congratulations — you’re back in business. If it still doesn’t work, you can continue to try — carefully — or take it to an Apple service center for professional help.