Yes. Apple or Apple Store can restore your iPhone to factory. You can Restore your iPhone to factory also. Connect iPhone to iTunes on computer with USB Cable. Click Restore button of iTunes or on iPhone itself, just tap Setings App > General > Reset > Erase All Content and Settings. Done.