Always backup your personal information before deleting!
Also, remember to remove your iTunes, iCloud and any other passcodes before shipping your device.
1) Launch the Settings app on your iPhone/iPad.
2) Tap General.
3) Scroll to the bottom and tap Reset.
4) Tap Erase All Content and Settings.
5) Enter your passcode.
6) Tap Erase iPhone.
7) Tap Erase iPhone again to confirm.
8) Enter your Apple ID password to turn off activation Lock and remove the device from Find my iPhone.
9) Tap Erase.
1) Restart your Mac.
2) While the startup disc is waking up, hold down the Command+R keys simultaneously. You're Mac will boot into macOS Recover.
3) Select Disk Utility.
4) Click on Continue.
5) Click on View.
6) Click on Show all Devices.
7) Select your Startup disk (it is probably named "Apple SSD" or something similar).
8) Click on Erase from the buttons at the top of the Disk Utility window.
9) Enter a name for the file to be destroyed (Like Macintosh HD or something).
10) Click Erase
11) After the process is complete, select Quit Disk Utility from the Disk Utility drop-down menu in the upper left corner of the screen.
12) Shutdown Mac.
For your security, in the case you leave any names or accounts on the device we always wipe it clean.
Please remember to disable iCloud and passcodes from your devices.