You may need to wipe your iPhone in order to sell it or get the device serviced or replaced. After all, the iPhone is a treasure trove of personal data with access to contacts, online accounts, and more.