iPhone 5 slowly fails to connect to wifi 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?


  Update!


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. 


  Long-awaited update


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.
If re-setting your network connections didn't help, it could be a hardware problem.

Depending on when it was made, it could be that your WiFi chip inside the phone has pulled  (or, rather, is in the process of pulling) off of the circuit board. Late 4S models also had this problem, and here's how it manifests (progressively):


Very slow speeds / drops connection to the network intermittently
Stops seeing most (or all) networks, but the WiFi button still works, it's not grayed out
Can't turn WiFi on at all, the button is grayed out in the settings menu - but the WiFi button in the control center might appear to work. 


If your phone is under warranty, then take it to an Apple store and have them replace it. Believe it or not, the repair is quite easy, so if it's out of warranty and you know of a place that fixes phones, they've probably got some spare chips and won't charge too much. Apparently, it's a manufacturing defect, so a repaired phone fixed by someone that knows their stuff could last quite some time. 

This has only been a problem with certain 4S and 5 models, you'll see a bunch of people reporting it if you search for something like "iPhone in freezer" - because (believe it or not), putting your phone in a Ziplock and then freezing it for a few minutes has been known to fix the problem for a short time (though I don't recommend doing this).

AFAIK, this isn't an issue with 5C, 5S or recently (as in the last year) manufactured iPhone 5 units. Could be a good opportunity to upgrade, even if you manage to get it fixed.