How to Restore an iCloud Backup to a New iPhone with 2 Factor Authentication

My wife recently purchased a new iPhone 7. We backed up her old iPhone to iCloud, then proceeded to start up her new iPhone, selecting the Restore from iCloud Backup option. We then hit a snag. 

I had enabled 2 Factor Authentication for iCloud access. This meant to be able to access her iCloud account from the new phone, she needed to provide a code that would be SMS’d to her iPhone. However has her number had been transferred to the SIM card in the new iPhone, this meant the SMS would go to the new iPhone, the one we were trying to set up. Because we were still trying to set it up, we couldn’t see the code. We also didn’t have any other phone we could put that SIM card in.

The only other option would have been to recover the iCloud account via an alternate method., which takes several days. Not what we wanted to do. 

After much frustration and a phone call to AppleCare, it turned out the solution is simple:

Select the Resend Verification option

The initial SMS was hidden and didn’t automatically advance us through the process, but tapping the option to resend the code enabled us to continue forward. We still didn’t see the message, but the phone automatically recognised it had been sent the verification code and allowed us to continue to restore the new phone from the iCloud backup.