Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
SSID wifi
NSString *ssid = nil;
NSArray *ifs = (id)CFBridgingRelease(CNCopySupportedInterfaces());
for (NSString *ifnam in ifs) {
NSDictionary *info = (id)CFBridgingRelease(CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam));
if (info[@"SSID"]) {
ssid = [info[@"SSID"] copy]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment