1). I want to get the entire list of Wi-Fi SSID programmatically in iphone.
I am trying the following code, but it only gives details of the connected SSID.
NSArray *ifs = (id)CNCopySupportedInterfaces(); NSLog(@"%s: Supported interfaces: %@", __func__, ifs); id info = nil; for (NSString *ifnam in ifs) { info = (id)CNCopyCurrentNetworkInfo((CFStringRef)ifnam); NSLog(@"%s: %@ => %@", __func__, ifnam, info); if (info && [info count]) { break; } [info release]; }
2). Another question is how can I determine this if I enter the Wi-Fi range when my Wi-Fi is turned off. Is it possible to determine that I am in the Wi-Fi range when Wi-Fi is turned off?
source share