Skip to content

Instantly share code, notes, and snippets.

@braitom
Created March 20, 2014 07:35
Show Gist options
  • Save braitom/9658966 to your computer and use it in GitHub Desktop.
Save braitom/9658966 to your computer and use it in GitHub Desktop.
get SSID info
#pragma mark - fetchSSID
- (id)fetchSSIDInfo {
NSArray *ifs = (__bridge_transfer id) CNCopySupportedInterfaces();
NSLog(@"Supported interfaces: %@", ifs);
id info = nil;
for (NSString *ifnam in ifs) {
info = (__bridge_transfer id) CNCopyCurrentNetworkInfo((__bridge CFStringRef) ifnam);
NSLog(@"%@ => %@", ifnam, info);
if (info && [info count]) {break;}
}
return info;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment