-
-
Save ichitaso/6155353 to your computer and use it in GitHub Desktop.
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
#import <SystemConfiguration/CaptiveNetwork.h> | |
NSString *currentSSID = @""; | |
CFArrayRef myArray = CNCopySupportedInterfaces(); | |
if (myArray != nil){ | |
NSDictionary* myDict = (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