当前位置:编程学习 > wap >>

iOS WIFI唯一标识

以下是取得设备连接的当前WIFI名称.    
 
NSArray *names = (__bridge NSArray*)CNCopySupportedInte易做图ces();
 
    NSDictionary *info = nil;
 
    for (NSString *name in names) {
 
        info = (__bridge NSDictionary*)CNCopyCurrentNetworkInfo((__bridge CFStringRef)name);
 
        if (info && [info count]) {
 
            break;
 
        }
 
    }
 
    NSString *ssid = [[info objectForKey:(__bridge NSString*)kCNNetworkInfoKeySSID] lowercaseString];
 
    NSLog(@"ssid:%@",ssid);
补充:移动开发 , IOS ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,