7

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

iDev
  • 23,310
  • 7
  • 60
  • 85
T.D
  • 177
  • 2
  • 10
  • Nope, not possible without using private apis. – MweyaMutsvene Dec 10 '12 at 22:16
  • Possible duplicate of [iPhone get a list of all SSIDs without private library](https://stackoverflow.com/questions/9684341/iphone-get-a-list-of-all-ssids-without-private-library) – Senseful Sep 24 '18 at 05:26

1 Answers1

8

I'm pretty sure you can't do this, at least not if you want to be able to publish on the App Store.

Lily Ballard
  • 182,031
  • 33
  • 381
  • 347
  • 1
    I posted a new question but no one has answered. Now I know that we can not list Wifi networks for an appstore app. Could you please tell me if it is possible any other way to test if Wifi is functional without using Reachability to test Connection to the internet. Highly appreciated! – ShayanK Dec 12 '13 at 12:58
  • Are we all sure about this? Has anyone used the Withings Aura device? I swear it has this as its on boarding process, choosing a wifi network from a list and you connect to it *WITHOUT* leaving to access Apple settings app. – Ethan Parker Oct 15 '14 at 23:21
  • But I know the circle app can do this and it is published on app store: https://meetcircle.com/ – Bill Yan Oct 23 '16 at 02:10
  • @BillYan I hadn't heard of that before. But from reading the site, it sounds like it doesn't offer its own wifi, it just attaches to your pre-existing one. The "pairing" with the device is probably using bluetooth. – Lily Ballard Oct 24 '16 at 19:46