#import <SystemConfiguration/CaptiveNetwork.h>

+ (id)fetchSSIDInfo
{
    NSArray *ifs = (id)CNCopySupportedInterfaces();
    NSLog(@"%s: Supported interfaces: %@", __func__, ifs);
    id info = nil;
    for (NSString *ifnam in ifs) {
        info = (id)CNCopyCurrentNetworkInfo((CFStringRef)ifnam);
        if (info && [info count]) {
            break;
        }
        [info release];
    }
    [ifs release];
    return [info autorelease];
}

//check wifi sid
        NSDictionary *ifs = [BaseFunction fetchSSIDInfo];
        NSString *ssid = [[ifs objectForKey:@"SSID"] lowercaseString];
        debug_NSLog(@"ssid:%@",ssid);

相关文章:

  • 2021-12-30
  • 2021-07-19
  • 2021-06-23
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2021-08-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
相关资源
相似解决方案