I am developing app to get all available wifi stations in Tableview. I get connected SSID name but i want all available SSID names. How can i get all available SSID name?
5
-
you will get only connected ssid name.– Uma MadhaviDec 16, 2015 at 7:44
-
Ya thats true but is that possible to get all ssid names?– kalpeshDec 16, 2015 at 7:45
-
1Without the use of private library (Apple80211) you can only get the SSID of the network your device is currently connected to.– Uma MadhaviDec 16, 2015 at 7:51
-
Did you find any solution to this problem without the private lib?– gaskbrApr 21, 2017 at 23:11
-
There is a bunch of applications in the App Store which could get a list of ssid names(Wi-Fi Finder as example), so it means that is somehow possible to do this. Would be nice if someone could share how do they did it.– Max NiagolovJul 12, 2017 at 5:47
Add a comment
|
1 Answer
You can use the following link to get the job done. https://github.com/belkevich/reachability-ios
else try this
@import SystemConfiguration.CaptiveNetwork;
/** Returns first non-empty SSID network info dictionary.
* @see CNCopyCurrentNetworkInfo */
- (NSDictionary *)fetchSSIDInfo
{
NSArray *interfaceNames = CFBridgingRelease(CNCopySupportedInterfaces());
NSLog(@"%s: Supported interfaces: %@", __func__, interfaceNames);
NSDictionary *SSIDInfo;
for (NSString *interfaceName in interfaceNames) {
SSIDInfo = CFBridgingRelease(
CNCopyCurrentNetworkInfo((__bridge CFStringRef)interfaceName));
NSLog(@"%s: %@ => %@", __func__, interfaceName, SSIDInfo);
BOOL isNotEmpty = (SSIDInfo.count > 0);
if (isNotEmpty) {
break;
}
}
return SSIDInfo;
}
-
3