A smashed screen prevents you from accessing the Settings app on the iPhone, but if the device turns on, you can still delete the data on your iPhone. Protect the security and privacy of your damaged iPhone by restoring the device with iTunes or using iCloud to remotely erase your device. ICloud works only if you previously set up Find My iPhone on your device. Using iTunes allows you to first create a backup to quickly restore the data once you repair your iPhone or purchase a new one.
Back Up Device
Connect your iPhone
Connect your iPhone to your computer using the provided USB connector cable and launch iTunes, if it doesn't start automatically.
Select the File'' menu
Select the "File" menu, choose "Devices" and then select "Back Up." Choose the option to "Back Up Apps," if prompted.
Click the iTunes menu
Click the "iTunes" menu on a Mac and the "Edit" menu on Windows. Select "Preferences" from the drop-down menu.
Click the Devices
Click the "Devices" tab and check to ensure the backup displays in the Device Backups section. Click "OK."
Erase Using iTunes
Connect your iPhone-2
Connect your iPhone to your computer and select the "iPhone" button when it displays in iTunes. Select your iPhone from the Devices section of the sidebar, if you enabled the option to show the sidebar available under the View menu.
Click the "Restore iPhone..." button to erase all of your data and settings. If you enabled Find My iPhone, you can't use iTunes to restore your iPhone since iTunes requires you to disable Find My iPhone before completing a restore.
Click the Restore button
Click the "Restore" button to confirm the restore process. When you get your new or repaired iPhone, you can restore the backup to your device using the "Restore Backup..." button.
Erase Using iCloud
Plug your iPhone into a wall outlet and power on the device. Navigate to the iCloud website (link in Resources).
Log in with the Apple ID and password associated with your device.
Click the Find My iPhone icon
Click the "Find My iPhone" icon.
Select the All Devices drop
Select the "All Devices" drop-down menu and choose your iPhone from the list of devices.
Choose the "Erase iPhone" option. Confirm your selection by selecting "Erase" again.
If you can't turn on your iPhone, you might need to take the device to a computer repair shop to professionally wipe your data.
Information in this article applies to iOS 7. It may vary slightly or significantly with other versions or products.