以下是取得設備連接的當前WIFI名稱.
NSArray *names = (__bridge NSArray*)CNCopySupportedInterfaces(); 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);