#import<SystemConfiguration/CaptiveNetwork.h>
- (void)fetchSSIDInfo{
NSArray *ifs = (__bridge_transfer id)CNCopySupportedInterfaces();
NSLog(@"支持的接口:%@",ifs);
id info = nil;
for (NSString *ifnam in ifs) {
info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam);
NSLog(@"%@ => %@",ifnam,info);
if (info && [info count]) {
break;
}
}
}
网友评论