美文网首页
iOS 获取wifi信息

iOS 获取wifi信息

作者: Satanshun | 来源:发表于2016-11-05 16:48 被阅读0次

    #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;

    }

    }

    }

    相关文章

      网友评论

          本文标题:iOS 获取wifi信息

          本文链接:https://www.haomeiwen.com/subject/dskguttx.html