ios获取当前wifi热点信息

#pragma mark - 获取当前连接wifi信息
- (NSString *)returnWifiName
{
    NSString *wifiName = @"Not Found";
    
    CFArrayRef myArray = CNCopySupportedInterfaces();
    
    if (myArray != nil) {
        CFDictionaryRef myDict = CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0));
        if (myDict != nil) {
            NSDictionary *dict = (NSDictionary*)CFBridgingRelease(myDict);
            
            wifiName = [dict valueForKey:@"SSID"];}
    }

    MyLog(@".....");
    return wifiName;
}

 

ios获取当前wifi热点信息,布布扣,bubuko.com

ios获取当前wifi热点信息

上一篇:do not back up IOS被拘处理


下一篇:安装VScode运行ROS