Question: how to factory reset iphone?
Answer: To reset your iPhone or iPad, go to Settings > General > Reset and then select Erase All Content and Settings.
If you've got an iCloud backup set up, iOS will ask if you'd like to update it, so you don't lose unsaved data.