CoreWLAN or any other public API for IOS 7
Asked Answered
S

1

5

I'm looking for a way to scan available Wi-Fi access points (hotspots) from my IOS-app.

All that I need is a list of active at the moment hotspot names, where a device is able to connect to. Like Safari shows a list of Wi-Fi hotspots when we start or activate it.

I'd like to publish the app on App Store, so I can't use any kind of Private API's (right?). And unfortunatelly CoreWLAN.framework is unavailable for IOS (right?).

So, is it possible to achieve my target? Can I collect available access points names (SSID) some way?

Selfpollination answered 10/11, 2013 at 12:9 Comment(0)
G
7

There is no Public APIs at the moment that you can use to get a list of available Wi-Fi access points. As you're planning to publish on the App Store, Private APIs are not an option.

The closest thing you can achieve is getting your currently connected Wi-Fi name and details which can be achievied with CaptiveNetwork with the SystemConfiguration.framework.

+ (NSString *)currentSSID
{
    NSString *ssid;

    NSArray *interfaces = (__bridge_transfer id)CNCopySupportedInterfaces();

    for (NSString *interfaceName in interfaces) {
        NSDictionary *informations = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)interfaceName);

        if (informations[@"SSID"]) {
            ssid = informations[@"SSID"];
        }
    }

    return ssid;
}
Goodtempered answered 19/11, 2014 at 20:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.