Why does my iPhone shut off when it is unplugged?

Well for a while now my iPhone has been shutting off when I unplug it. Sometimes the battery would just stay at a same percent for a while and I will take it off the charger and plug it back in, then my phone would shut off and come back on. That would keep the battery going up. Also lately, my phone has been receiving text messages really late and unless I turn my phone off I would get the messages late. Anyone has any suggestions?

Bring it to an apple store, sounds like a software problem

Replace the battery.

  • Why won't my iphone shut off? So this morning, I dropped my phone in the toilet (ik i'm a clutz) & Ik youre supposed to shut it off & put it in a bag of rice, but when I went to shut it off, it just turns on by itself again. What should I do? Btw, I have an iphone 4s.
  • Why does my iphone shut the call off at 4 or so hours? My boyfriend and I have been together for a while and sometimes we fall asleep on the phone, however, whenever we do I always wake up to the phone being disconnected. When i checked back at our phone history, it always hangs up the phone around 4 hours of talk time, even i its a full battery or its being left on the charger when we fall asleep. Is there some way to stop this?
  • Why does my iPhone shut off randomly all the time? I have an iPhone 5s and I have had it for more than a year now. As of recently, when I use it, I could be texting, snapchatting or watching youtube videos and out of nowhere with no warning, It just turns off. The apple logo comes on the screen and then It turns off again. It comes on and then turns off and it stays like that for about 10-30 minutes. I don't know why it's been doing this and it's getting really annoying.
  • Why does my iPhone shut down? When I touch my screen a little hard and let my finger stay there for some seconds, some white and black lines appear and then the whole iPhone shuts down. After some seconds the apple logo appears and the mobile turns on again. Can someone please tell me why this happens, and what I can do about it?