View in HD at . What if you need to connect to your iCloud account, but your iPhone doesn't have an Internet connection? Then you won't get a prompt with the two-factor code, but you can still generate the code manually and use it even though your iPhone isn't connected. Two-factor codes don't need to rely on Internet connections for verification. You can also get a code from your Mac even if it isn't connected.