Created
June 20, 2017 07:23
-
-
Save aratkevich/81c92c679b78bdf35dd37532f2abdd0d to your computer and use it in GitHub Desktop.
SSID wifi
This file contains 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
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