How to Bypass iPhone Codes
The iPhone pass code is a security feature that secures your information by asking for a four-digit or custom pass code to unlock the device. If you happen to forget the pass code and need access to your iPhone, you must restore the software to its original settings, followed by restoring your device's information to a date prior to creating a pass code.
Open iTunes. Plug the docking cable into your iPhone and into the computer's USB drive.
Right-click "iPhone" in the iTunes side window, and click "Restore."
Click "Don't Back Up." Wait for the iPhone's software to be reinstalled, and click "Restore from backup."
Select an earlier backup date in the iPhone setup window, and click "Continue."