So your iPhone won’t stay on a Wi-Fi network, or you can’t get it to join in the first place. What to do? Well, the first step in any troubleshooting scenario is to reboot the device, of course, so do that before you take more drastic steps. Afterward, you could also go to Settings > Wi-Fi, tap on the “i" next to the network (if it appears), and choose “Forget This Network.”
Attempt to rejoin the network after you do that, and maybe luck will be on your side so that’ll be all you have to do. But if that doesn’t fix things and you’re sure that your network is functional (as in, you can go online from a different device with no problems), then it’s time to pull out the big guns. And by “the big guns,” I mean “wiping out the device’s network settings and restoring them to defaults.” I’ve seen this fix bunches of network issues, and it’s a fairly easy troubleshooting trick. To do it, visit Settings > General on the device, scroll to the bottom, and touch “Reset.”
On the following screen, there are all sorts of things you can do, up to and including erasing all of the data on your device. The option you’re looking for, though, is labeled “Reset Network Settings.”
Once you tap that, you’ll see a typical big scary warning.
Confirm that you want to reset, and your phone will reboot and do its cleanup.
Afterward, you’ll have to rejoin all of the Wi-Fi networks you use (and enter their passwords again), and you may need to reconfigure any other associated services you’ve set up, like VPNs. But that hassle is a small price to pay for, you know, an actual functioning iPhone that can browse the Web and stuff. I don’t ask for much, but that’s pretty non-negotiable.