Hi,
You can try this manual technique once to reset your passcode without erasing data-
- Turn OFF the iPhone by pressing and holding the Power button until the device successfully powers off
- Attach the USB cable to the computer and launch iTunes – do not connect the iPhone yet
- Hold down the Home button, and as continuing to hold it connect the iPhone to the computer via USB cable
- As continuing to hold the Home button, the iPhone screen will Turn ON and show an iTunes logo and a USB cable
- When an alert box opens in iTunes indicating that a device has been detected in Restore mode, now let go of the Home button
- Click the “Restore” button in iTunes – if a local firmware file is found, it will restore immediately, otherwise it will download the appropriate firmware from Apple’s servers
- Now just wait until Restore is completed, the device will boot as if it was brand new
Once the phone has booted, you can either use it as brand new or initiate a recovery from a backup. A backup is necessary if you wish to restore personalization data like Contacts, apps, SMS, photos, and phone numbers.
iCloud will do that for you so long as the device was routinely backed up to iCloud and that the same Apple ID is used during the setup, but a backup stored in iTunes will also work. If you are only looking to restore apps and not personal data, simply use the same Apple ID and then launch the App Store to download the apps again to that device.