The most reliable way to unlock the iPhone in case of a lost password is to use the official iTunes app or contact Apple Care. This will ensure that you unlock the device safely. You can also use third-party software programs. The only thing you have to keep in mind is that the software is reliable and thoroughly tested.