-
-
Save edwardean/e3c4dd4bf01ab723c2ee to your computer and use it in GitHub Desktop.
iOS SSID
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
NSString *currentSSID = @""; | |
CFArrayRef myArray = CNCopySupportedInterfaces(); | |
if (myArray != nil){ | |
NSDictionary* myDict = (__bridge NSDictionary *) CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0)); | |
if (myDict!=nil){ | |
currentSSID=[myDict valueForKey:@"SSID"]; | |
} else { | |
currentSSID=@"<<NONE>>"; | |
} | |
} else { | |
currentSSID=@"<<NONE>>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment