Skip to content

Instantly share code, notes, and snippets.

@densa
Created January 25, 2013 08:31
Show Gist options
  • Save densa/4632803 to your computer and use it in GitHub Desktop.
Save densa/4632803 to your computer and use it in GitHub Desktop.
WiFi info
#import <SystemConfiguration/CaptiveNetwork.h>
- (id)fetchSSIDInfo
{
NSArray *ifs = (__bridge id)CNCopySupportedInterfaces();
NSLog(@"%s: Supported interfaces: %@", __func__, ifs);
id info = nil;
for (NSString *ifnam in ifs) {
info = (__bridge id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam);
NSLog(@"%s: %@ => %@", __func__, 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