Steps to be done before selling your iPhone

Settings > General > Erase > Erase all content and settings

That will wipe it to factory


I would just restore it in iTunes. That would wipe it of all data and reset it back to factory settings.


Regarding step 6 in the article you linked:

There is a difference between destroying the encryption key and writing over the data on your iPhone with new data a la "Secure Empty Trash" in Mac OS X. As far as I was able to find (searching a lot on the net), iOS 2.0 + on original and 3G, data was actually securely erased by writing over it. iPhone 3GS and later simply drop the encryption key and make a new one when you "Erase" from within settings. This is a 256 bit (AES i think) key, so recreating it would be challenging, though not impossible (for someone with time/resources, i.e. government agency).

I recently listed an old iphone for sale. (In addition to unregistering it with all services, find phone, imessage, apple support, any other third party accounts you have connected to it, etc.): If/when it sells I plan to do the following:

  1. *Reset iPhone in Settings as detailed by MisterMike
  2. *sync with iTunes and have it "Automatically fill free space with music."
  3. repeat both above steps 1 & 2 at least twice more (arbitrary number, not sure if more times helps or makes no difference with the type of NAND memory in my hardware version, or any other).
  4. *Do a factory firmware restore on the iphone.
  5. repeat step 3
  6. repeat step 1
  7. repeat step 4
  8. congratulate myself on massive redundancy.

Note: if you just want to ensure the data is written over once, just do steps 1,2, and 4.