This kind of message often appears after a restore or iOS update. In most cases, it means that your device is not allowing you to connect to Apple’s iCloud verification servers.
Note: To solve the issue, another iPhone is necessary.
Follow these steps to get rid of the annoying message:
- Sign in with your Apple ID on another iPhone.
- Go to Settings > iCloud.
- Select Password and Security.
- Tap Generate Verification Code.
- Now enter the new verification code into the iPhone with the error.
Your iOS should work fine now, enjoy!