My iPhone 5 running 7.1.1 has stopped connecting to wifi networks.
In the beginning, everything was fine. It seemed like maybe the network in my house was stretched a little thin, and I had trouble connecting at one end of the house. So did all of our other devices, so I thought nothing of it.
Then I moved to a house where I don't have access to the wifi controls. My phone began to drop the connection periodically, but I could usually get back in after a few tries. I blamed it on my stepdad's weird network settings that I couldn't access. Until I stopped being able to get in at all. No matter what, I got the "Unable to join the network "[our network]"" dialog and "Failed to join ["ournetwork"]".
I was still blaming it on my stepdad (because that's what stepdads are for) when I realized I couldn't connect to any of the public wifi networks in places I visit periodically (and have successfully connected to before).
I have restarted my iPhone and reset its network settings. This morning I did a full backup and restore, having read around the internet that that fixed the problem for many. During the iOS setup process, I was asked to enter a password for a nearby wifi network. Nada. Couldn't get in.
It's like my iPhone 5 just slowly forgot how to wifi. How do I remind it?
I took my phone to the Genius Bar, where an Apple employee ran all the diagnostics and looked into a bunch of histories. He found that TCCService had been crashing periodically, and did a Reset All Settings (as opposed to Reset Network Settings, which I'd already done).
It seems to have helped a little bit, but it remains to be seen whether this has fixed the problem completely.
Profiles were to blame.
I have a couple of different custom profiles on my phone because I work with a few beta apps. Removing obsolete profiles fixed this problem.