Question: how to fix your iphone when it keeps restarting?
Answer: Back Up Your iPhone. Before we do any troubleshooting at all, make sure your iPhone is backed up. ... 
Update Your iPhone's Software (iOS) ... 
Determine If An App Is Causing Your iPhone To Restart. ... 
Reset All Settings. ... 
Remove Your SIM Card. ... 
Hard Reset. ... 
Restore Your iPhone Using iTunes. ... 
Check For A Hardware Problem.