iPhone 4S turning off and discharging randomly My iPhone 4S (iOS 9.3.5) is randomly turning off and discharging at unexpected moments. It shows the spinning icon as if it was about to respring but turns off and the battery is dead.

When I plug it in a power source, however, within a few minutes, it goes back to the battery percentage of before dying.

Why is my iPhone doing this?
Having a trained repair person put a working battery in the device would let you know if the failure is simply due to battery / voltage or another hardware fault. Hard to tell without testing and doing the work, though.

Voltage drops is what causes the unexpected power off so corrosion or a faulty device that over draws the current that can be supplied can cause this. Also, perfectly working electronics won’t work if the battery is failing / failed.

Apple service diagnostic can usually tell if the battery is healthy, but I don’t know if they offer that service on this old of equipment anymore.