lak*_*esh 3 xcode bssid reachability ios captivenetwork
我使用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);
Run Code Online (Sandbox Code Playgroud)
的NSLog(@ "%@",CNCopySupportedInterfaces());
返回(null)
不确定是什么问题?需要一些指导
| 归档时间: |
|
| 查看次数: |
3740 次 |
| 最近记录: |