zoukankan      html  css  js  c++  java
  • iOS 获取WIFI SSID及MAC地址

        NSString *ssid = @"Not Found";

        NSString *macIp = @"Not Found";

        CFArrayRef myArray = CNCopySupportedInterfaces();

        if (myArray != nil) {

            CFDictionaryRef myDict = CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0));

            if (myDict != nil) {

                NSDictionary *dict = (NSDictionary*)CFBridgingRelease(myDict);

                

                ssid = [dict valueForKey:@"SSID"];

                macIp = [dict valueForKey:@"BSSID"];

            }

        }

        UIAlertView *av = [[UIAlertView alloc] initWithTitle:ssid

                                                     message:macIp

                                                    delegate:nil

                                           cancelButtonTitle:nil

                                           otherButtonTitles:@"OK", nil];

        [av show];

  • 相关阅读:
    Linux cat
    Linux touch
    Win10 UAP 绑定
    Win10 资源文件
    Win10 启动模拟器
    Win10 安装Vs2015 社区版和企业版各个问题汇总
    Win10 开发者模式开启
    android 入门-本地化语言
    android 入门-基础了解
    wp8 入门到精通 定时更新瓷贴
  • 原文地址:https://www.cnblogs.com/fuunnyy/p/5168508.html
Copyright © 2011-2022 走看看