Before you sell your iPhone, it's extremely important and necessary to erase all data including contacts, text messages, photos, videos and other personal information on it, for you don't want others access your important personal data on the iPhone and leak your privacy out after you sell it. So how to securely and completely delete iPhone data so that no data recovery program can recover them later? Now simply follow the guide here to permanently erase your iPhone before selling. You should be aware with the internal flash memory on your iPhone, data isn't really erased when you delete something. So in order to permanently delete data and personal information from iPhone, you are suggested to use a third-party data eraser software called iPhone Data Eraser which can assist you erase all contents on your iPhone 5S/5C/5/4S/4/3GS permanently with 1 click. It's able to erase all iPhone data, including Contacts, SMS, Call History, Calendars, Emails, Notes, Reminders, Apps, System settings, Apple ID, Photos, Videos, Safari Bookmarks, Passbook and so forth. Source: http://www.recovery-ios.com/data-eraser/erase-iphone-data.html