我正在使用 CNCopySupportedInterfaces() 来获取 bssid 并且它没有返回任何值。不知道为什么。
我的代码如下所示:
#import <SystemConfiguration/CaptiveNetwork.h>
CFArrayRef myArray = CNCopySupportedInterfaces();
CFDictionaryRef myDict = CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0));
NSLog(@"Connected at:%@",myDict);
NSDictionary *myDictionary = (__bridge_transfer NSDictionary*)myDict;
NSString * BSSID = [myDictionary objectForKey:@"BSSID"];
NSLog(@"bssid is %@",BSSID);
NSLog(@"%@",CNCopySupportedInterfaces());
返回(空)
不知道出了什么问题?需要一些指导