获取当前wifi:
ios9.0之前
#import <SystemConfiguration/captiveNetwork.h>
NSArray *wifiArr = CFBridgingRelease(CNCopySupportedInterfaces());
NSLog(@"%@", wifiArr);
id info = nil;
for (NSString *wifi in wifiArr) {
info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)wifi);
NSLog(@"%@=>%@", wifi, info);
if (info && [info count]) {
break;
}
}
iOS9.0之后
使用<NetworkExtension/NEHotspotHelper.h>代替了之前的<SystemConfiguration/captiveNetwork.h>