How to get the SSID (Service Set Identifier), I have been search for few while but nothing useful. Is that anyone can help?
However, I try this code in ios7
-(NSString *)getWifiName{
NSString *wifiName = @"Not Found";
CFArrayRef myArray = CNCopySupportedInterfaces();
if (myArray != nil) {
CFDictionaryRef myDict = CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0));
if (myDict != nil) {
NSDictionary *dict = (NSDictionary*)CFBridgingRelease(myDict);
wifiName = [dict valueForKey:@"SSID"];
}
}
NSLog(@"wifiName:%@", wifiName);
return wifiName;
}
but it cant get the SSID.