Created
January 25, 2013 08:31
-
-
Save densa/4632803 to your computer and use it in GitHub Desktop.
WiFi info
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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