Warning From CNET: iPhone "Restore" does not delete personal data! That means your personal data on your iPhone can be found even if you had a factory reset. So your important data such as Text messages sent & received might be seen by peeper when you want to resell it.

SafeEraser can help you erase all text messages on your iPad/iPhone/iPod touch completely. Returning the device to a "clean slate" state before you resell it. Moreover, it works well on the new iOS 7, iPhone 5S, iPhone 5C.

Code:
youtube.com/watch?v=c1AQCLFfUkk
Erase All Data on Your iPhone
Contacts, SMS Text Message, Call History, Calendar, Email, Note, Reminder, iTunes DB, App (and generated data), System setting, Apple ID, Photo, Video, Voice memo, Keyboard Cache, Safari Bookmark, Passbook, and more


Erase Traces of Deleted Files
Contacts, Messgaes & iMessage, Call Logs & Facetime, Calendar & Reminders, Notes, Voice Memos, Safari Bookmark, Photos