Iphone 7 shutting off randomly but goes back to lockscreen?

Hi. I've had my iphone 7 for a few months now (since christmas) and everything has been fine until a month ago. I thought it was just twitter but it happens even when i'm texting! I'll be doing whatever then my phone going black and the little spinner pops up like my phone is dying but it never dies it just takes me back to the lockscreen? Please help it happens a lot usually rebooting helps temporarily but it comes back

Baaj

You too? I have the same problem on iphone 4s, about 1 month ago, and it is not even eligible for recent ios updates. Maybe it is an individual app update

  • Why is my iphone 5 keep shutting off randomly when it still has battery? My iphone 5 had 8 percent left don't remember if it was charging from my laptop but I check it was 8 percent before I went to bed. I woke up at 4am and it was dead. I let it be and decided to charge it the next day. Then in the morning when I connect my iphone to the car it charged to 97%. What could possibly happen? Please help thank you! I'm thinking maybe my laptop died and probably messed up my iphone but either way why would it suddenly charge to 97% the next day?
  • My jailbroken iphone ios 8 randomly respons and goes to safemode? My tweaks are: Aktivator Beacon2 Ccsettings Colorbadges Cydelete Cydget Cydia enable Cydown F.lux Frontflash Icaughtupro Itouchsecure Linkstore LocallApStore Phantom Preferenceorganizer2 Slide2kill8pro Statusweather Sticky Verbatim
  • My Iphone keeps shutting off, but before it shuts off, my screen freezes and there's these lines that show up, they're random? My Iphone keeps shutting off, but before it shuts off, my screen freezes and there's these lines that show up, they're random. Sometimes there's this crackling sound, and sometimes the line move, my mom says its just the phone, but my dad says, its the proccecor and that its overheated, i have an Iphone SE rose gold 64 gb and my iOS is 12.3.1
  • My iPhone 5c randomly started to turn off but then turned back on? I was playing on my iPhone and then it went to the apple logo as if turning off, so inassumed it had died, and I was about to plug it in when it turned back on and my battery was at 86% still. It scared me because I'm a already a bit paranoid as my door randomly opened earlier, so with my iPhone being weird on top of that I'm a bit freaked out, are there any logical reasons on why it did this? I've had the phone for 2 months and it's never done this before