If you're locked out of your iPad, iPod or iPhone then don't fret because there is a way to reset a forgotten iOS passcode. But if you want to keep all your stuff and avoid wiping your device you will need a recent backup and you'll need to know the Apple ID and password of the account that was used to set it up.
The good news is that no matter whether you have an iTunes backup or not, it's possible to reset your iPhone or iPad. Even if you've put a wrong passcode in six times and are presented with an "iPad is disabled" messages, not all is lost.
That's because Apple has thought about this possibility and made a way for devices to be reset. The key question is have you already synced your iPad or iPhone with iTunes on your computer?
If you didn't make a backup of your device before you forgot your passcode, you might lose some of your recent data. This guide will also work for anyone with an iPod touch.
Apple advises the following:
If you've synced your iPhone, iPad or iPod with iTunes, use iTunes to erase your device and remove your passcode.
If you're signed in to iCloud and have enabled Find My iPhone, use iCloud to erase your device.
If you can't sync or connect with iTunes and you don't use iCloud, use recovery mode to erase your device.
We explain how to erase your device and remove your passcode using all three of the above methods here. Read on to find out how.
How to use iTunes to reset a forgotten passcode
If you've recently backed up your iPad, iPhone or iPod with iTunes on your computer, you'll be able to restore your device and keep all your photos, messages and other stuff - up to the point when the backup was made.
To do this, connect your iPad, iPod or iPhone to the PC or Mac that you normally sync with and open iTunes. If iTunes asks you to enter the passcode, use another computer that you have previously synced with. Otherwise, you'll need to use recovery mode or iCloud (read on to find out how).
If the device is still disabled, or if iTunes does not automatically sync your device, sync the device with iTunes with the 'Sync' button.
When the backup and sync is complete, restore your device by clicking 'Restore iPad' (or iPhone).
When the iOS Setup Assistant asks to set up your device, click "Restore from iTunes backup".
Select your device in iTunes and choose the most recent backup of your device. Restoring the backup can take a while: iTunes should indicate how long you'll be waiting. Note that apps are generally downloaded again over Wi-Fi after the restore is complete: don't worry, though, as their data is part of the backup so once installed, all your messages and other stuff should be there.
How to use iCloud to reset a forgotten passcode
If you have Find My iPhone set up on your device, you'll be able to use iCloud to erase it and restore it, which will in turn erase its passcode. It will also erase the contents, though, which means you'll lose photos, apps, videos, messages and anything else you had stored on it. But you can restore these if you have an iTunes or iCloud backup.
In order to do so, go to icloud.com/find from a computer or mobile device. There, you'll need to sign in with your Apple ID (the email address and password you use to login to the iOS App Store).
You should see All Devices at the top of the window. Click that and choose the device you're locked out of. Then choose Erase.
You'll now be able to restore from a backup if you have one, or set up your device as new.
How to use recovery mode to reset a forgotten passcode
If you see one of following alerts, you need to erase your device.
"iTunes could not connect to the [device] because it is locked with a passcode. You must enter your passcode on the [device] before it can be used with iTunes." Or "You haven't chosen to have [device] trust this computer"
To do so, you'll first need to place your device in recovery mode. Find out how to do this in our How to get an iPhone, iPad or iPod touch in and out of recovery mode guide then come back and move on to the next step.
Click 'OK' on the message from iTunes stating the device is in recovery mode.
You can now restore your device from iTunes. That doesn't mean everything will be as it was before: you'll need a backup for that. If you have no backup, Restore means the latest version of iOS will be installed, but that's it.
And you may be asked to enter the email address and Apple ID password of the account that was previously used on that device: this is a safety feature to prevent iPads and iPhones being stolen, restored and then sold on.