iOS기기에 연결한 WIFI 정보 얻기

#import <SystemConfiguration/CaptiveNetwork.h>

NSArray *interFaceNames = (__bridge_transfer id)CNCopySupportedInterfaces();
for (NSString *name in interFaceNames) {
NSDictionary *info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)name);
NSLog(@"%@", info);
}

위와 코드를 실행하면 아래와 같은 로그가 찍힌다.

2017-08-08 15:23:56.836410+0900 SMTWiFiStatus_Example[625:299722] {
BSSID = "88:36:6c:4d:40:70";
SSID = metal;
SSIDDATA = <6d657461 6c>;
}
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade