An iPhone that won't charge properly seriously limits the device's usefulness. If your iPhone running iOS 8 won't charge, perform a few troubleshooting procedures to diagnose and fix the problem.
Severely Depleted Batteries
When your iPhone's battery is seriously depleted, it may at first appear as though it's not charging. Normally, the battery icon pops up when you connect the charging cable, but this may not happen for several minutes with a very low battery. Leave the iPhone connected to the charger for 10 to 15 minutes. Usually the battery icon appears after this amount of time and you can continue charging the phone as usual.
Checking Basic Connections
If the battery icon doesn't show up and the phone is not charging, start with some basic troubleshooting to make sure your iPhone is set up to charge properly. Examine the charging port on the bottom of the iPhone to make sure it's not damaged or filled with debris. Inspect your charging cable to verify it's not damaged. Insert the cable firmly into the port on the iPhone and connect it to a working power outlet. If you're using a power bar, make sure the power bar is turned on.
Charging Using USB
If you're attempting to charge your iPhone using a USB port on your computer, the computer must be turned and not in sleep mode in order for the iPhone to charge. If the first USB port doesn't work, try another one. The iPhone can charge when connected to a powered USB hub, but not when connected to a USB port on an external keyboard.
Depending on the iPhone model and version of iOS you're running, you may not be able to use third-party chargers. Apple suggests using only Apple-certified chargers. If you've recently upgraded to iOS 8 and are using a third-party Lightning charger, your charger may no longer work. If you have the original on hand, use it instead. If you don't have the original cable, purchase a new Lightning cable that has MFi certification. Only MFi-certified cables work for devices running iOS 8 and up, as of publication.
Restarting and Resetting Your iPhone
If the iPhone works while connected to a power source but won't charge, plug it in and restart the device. Hold down the "Sleep/Wake" button on the top of the phone and then swipe the on-screen slider to confirm that you want to turn the device off. After the iPhone turns off, press the "Sleep/Wake" button to turn it back on. Try to charge the phone again after it reboots. If you're unable to restart the phone in this way, reset it instead. Press and hold the "Sleep/Wake" and "Home" buttons simultaneously for at least 10 seconds or until the Apple logo appears. Try again to charge the phone.
Replacing the Battery
In some instances, batteries are too old to charge or become damaged. In these instances, take your iPhone to an Apple store or licensed repair shop to have the battery replaced.