Reputation: 177
In my iOS app, I want to detect all available wifi networks and then choose one network form the list and connect to it. The goal is to not open the Settings built in app to connect to a wifi, but to do it all in my app.
First, is this possible? If possible, please point me to what framework(s) and methods to use.
I have looked at the Reachability example, but that doesn't work for me because, I think, all it does is monitor the network state of the device.
I also looked at the Captive Network Support framework, and used the CNCopySupportedInterfaces
function:
CFArrayRef allWifiNetworks = CNCopySupportedInterfaces();
NSLog(@"%@", allWifiNetworks);
but all I am seeing is the current wifi network that the device is connected to.
Thanks
Upvotes: 7
Views: 2841
Reputation: 185653
I'm pretty sure you can't do this, at least not if you want to be able to publish on the App Store.
Upvotes: 8