iPhone battery issues are, by far, the most common iPhone issues I come across. While it's true that batteries are consumable items, and as such will wear out over time, many times the problem with the iPhone is not the battery but an app, or maybe even the charger.
Must read: Upgrade your office with these tools and gadgets
Fortunately, iOS 13 gives you a number of tools to help you diagnose battery issues, and here we'll take a tour of them and see how you can use them to find out whether you iPhone's battery needs replacing, or whether the problem is down to an app, or whether your charger of cable is faulty.
First thing to check is battery health. To do this visit Settings > Battery > Battery Health.
Here you have access to two bits of important data. If this screen shows Maximum Capacity over 80% and Peak Performance Capability is showing "Your battery is currently supporting normal peak performance," then you are OK. If this is not the case then you may have isolated your battery issue, and you may be looking at replacing the battery.
The Peak Performance Capability will also tell you if your iPhone has suffered a shutdown due to a battery issue. If it says "This iPhone has experienced an unexpected shutdown because the battery was unable to deliver the necessary peak power," then this may indicate a worn battery. However, I say "may" because cold weather can also cause a similar problem, and if Maximum Capacity is shown to be over 80% and you're not getting random shutdowns, then your battery might still be OK.
Your iPhone logs battery usage over time, and this can be a very useful diagnostic tool. Head over to Settings > Battery, and you'll see a chart called Battery Level that looks as follows:
There's a lot going on here, so let me break it down for you. Green shows when the iPhone was running normally off of its own battery power, while yellow shows when your iPhone was in Low Power Mode. The hatched green areas shows when your iPhone was on charge.
Last Charge Level shows how much charge was put into the battery during the last recharge, a good way to quickly see if the battery was fully charged or not.
You can use this to see what your battery drain is like, and whether the iPhone is actually charging when you think it is. If you're not seeing those green hatched areas, then test your charger, and if you are using an older cable, check the Lightning connector for corrosion.
Underneath the Battery Level chart is another one called Activity.
This chart logs how much time apps were running on the screen (the dark blue bits of the bar) and when the screen is off (shown in light blue).
If you are seeing a lot of background activity then this could signify a problem with an app. The table below this chart beaks down battery usage by the app, and you can choose to view data buy battery usage, but by clicking on the blue Show Activity link you can get a breakdown of on-screen and background time.
While some apps legitimately need a lot of background time to function (such as the Tile app in the image above), this can also signify a problem, and could cause battery drain. A way to test this is to disable an app's ability to run in the background by going to Settings General > Background App Refresh and turning that off for any apps that look to be heavy users.
This is the nuclear option, but it can help you ascertain if the issue is a hardware issue or software. I only recommend this as a last resort because it is very time-consuming.
To do this, go to Settings > General > Reset and choose Reset All Settings or, if you want to delete all the apps too, Reset All Content and Settings.