Sifting through the news of the latest update of iOS and iPadOS 15.2, we also find the possibility of initializing an iPhone or iPad locked on the screen that requires the entry of the unlock code. Even before it was possible to do this but it was necessary to connect the iPhone to the Mac or to a Windows PC to put the phone in DFU recovery mode, Device Firmware Update, and then initialize it and restore it.
The new option is useful for restoring iPhone, iPad or iPod touch in case the user forgets the unlock code. Apple explains that to reset the device with this procedure on the latter there must be iOS 15.2 or iPadOS 15.2 or later, the device must be connected to a cellular or Wi-Fi network and obviously you need the Apple ID and the password used to configure the device. SO, if you forgot your passcode, you can use your Apple ID and password to erase and reset your device, as Apple explains here.

How to reset your iPhone, iPad, or iPod touch when you forgot your passcode
From the lock screen, you have to try to enter the passcode until the device asks you to try again at a later time. Whenever possible, this step is repeated until the Erase [device name] option appears in the lower corner of the screen.
- You need to have a device that’s using iOS 15.2 or iPadOS 15.2 or later.
- Your device needs to be connected to a cellular or Wi-Fi network.
- You’ll need your Apple ID and password that you used to set up your device.
So, from your device’s Lock Screen, try entering your passcode until your device asks you to try again later. When you’re able to, repeat this step until you see the Erase [Device] option in the bottom corner of the screen.
At this point,
- Tap Erase [Device], then tap Erase [Device] again to confirm.
- Enter your Apple ID password to sign out of your Apple ID on your device.
- Tap Erase [Device] to permanently delete all of your data and settings.
- When your device restarts, follow the onscreen instructions to set up your device again, restore your data and settings from a backup, and set a new passcode.
When your device restarts, simply follow the on-screen instructions to set it up again, restore your data and settings from a backup, and set a new passcode.
We also remind you that to carry out this operation it is necessary to have an Internet connection available, via a Wi-Fi network or via the cellular network, and it is also necessary to use the same Apple ID and password used for the first configuration of the device. Obviously, these are limitations and requests to prevent a stolen iPhone or Apple device from being reset and then resold, but of course, you already knew that.