Source: James Ruffer III, Certified Ethical Hacker
For consumers with iPhones or devices supported by iTunes, you can perform a secure back-up before dropping off your device at a repair shop:
1. Connect your device to the computer where you load and sync your phone with iTunes.
2. Select your iPhone in iTunes, then select "Back Up Now."
3. Select "This Computer."
4. Select "Encrypt Local Backup." You will be prompted to create a separate password for your encryption login, something different from your iTunes login and password.
5. Once your encryption login/password is approved, follow the prompts for a secure, encrypted back-up.
6. Once the back-up is verified, go to "Settings" in your iPhone, then select "General."
7. Scroll down to the bottom of the screen and select "Reset."
8. Select "Erase All Content & Settings."
9. Your phone should be ready to give to a repair shop.
10. When it's returned, plug your phone back into your iTunes back-up computer.
11. Click "Restore Backup" in ITunes. It should re-load your phone's personalized content and settings.
Android and other smart phone users, please consult your owner's manual or technical support.