If your iPhone stars to randomly shut off or restarts over and over when powering on, this maybe a software issues that others have experienced on their iPhone. Before running off to the Apple store’s Genius Bar or calling Apple Support to be placed on hold, you may want to try the following actions to get your iPhone back up and running without losing time, data and money.
Fix Your iPhone or iPad Using Recovery Mode
First you have to power off your device completely. If pressing the top power button and swiping off dose not work, try holding down both power button and home button at the same time for a few seconds to power it off.
Next, power on your device (plugging in your device to the computer will automatically power it on). Quickly start holding down the home button until you see the screen indicating the need to connect to iTunes with a picture of the USB graphic with an arrow pointing to an iTunes icon.
Next, iTunes will show a message that it detected a device in recovery mode. Click “Ok” to begin the process. You will be presented with options during this process to restore using a previous backup from iTunes or iCloud.
If this does not resolve your problem, it maybe a hardware issues and should be taken to Apple for a repair.