Q: Hi. I turn my iPhone off every night before I go to bed, as I don’t want it waking me up in the middle of the night, but when I turn it back on in the morning, it doesn’t seem to want to connect to my home Wi-Fi right away. If I start using it, it eventually works, but sometimes I’ll turn it on and go take a shower, and when I come out and get ready, it still only says 3G — there’s no little Wi-Fi symbol there. I don’t have much data on my plan, so I don’t want to be wasting data if my iPhone is checking my emails and stuff when it starts back up again. Any ideas how I can get it to automatically connect when I turn it on?
A: Unfortunately, this is more or less by design. You’ve essentially run into a side effect of the iPhone’s Data Protection feature, designed to keep sensitive data such as Wi-Fi passwords encrypted when your iPhone is locked with a passcode.
iOS stores all of your passwords — including the one for your Wi-Fi network — in an encrypted area called the “Keychain,” which is secured with your device’s passcode. When you restart your iPhone, none of these passwords are decrypted until you’ve unlocked your iPhone — and the iOS Keychain — by entering your passcode. Until you do this, your iPhone doesn’t “know” your Wi-Fi password, and therefore can’t connect to your Wi-Fi network. This problem isn’t limited to Wi-Fi either — for the same reason, your iPhone won’t be able to check your email accounts, even over a cellular connection, until you’ve unlocked it at least once. Of course, some apps may still be able to perform certain tasks in the background without requiring access to passwords from the keychain, so it’s valid to still be at least somewhat concerned about data usage. Although depending on the apps in question, the amount of data that gets used in this case should be pretty minimal. If you’re concerned, however, you can check your data usage via the iOS Settings app just to be sure.
So when restarting your iPhone, simply ensure that you enter the passcode at least once to unlock it. Once you’ve done this, you don’t even need to do anything else with the iPhone — you can even just press the Sleep/Wake button to put it right back to sleep. Once your Wi-Fi password has been decrypted, it will remain in memory so that your iPhone can connect to Wi-Fi. It may still take a few seconds to connect, but it will eventually do so by itself once it can read the password.
As an aside, however, you may be putting yourself through more trouble than you need to by shutting your iPhone down at night. If you’re simply looking to avoid receiving notifications, you may want to consider using the Do Not Disturb mode instead, which will silence all notifications except for alarms and, if configured, calls from specific numbers. Do Not Disturb can be configured manually, or you can even set a schedule for it so that it kicks in automatically around bedtime, and turns off again when you get up in the morning. Leaving your iPhone on also has the advantage of ensuring that things like email will update in the background, and that iCloud backups can run properly. Really, except in cases where you’re trying to conserve battery, there’s rarely any reason to turn your iPhone off completely.