2012-07-11 47 views

回答

1

查找there

嘗試這種情況:

CFArrayRef myArray = CNCopySupportedInterfaces(); 
CFDictionaryRef captiveNetWork = CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0)); 
NSLog(@"Connected at : %@", captiveNetWork); 
NSDictionary *myDictionnary = (__bridge NSDictionary *)captiveNetWork; 
NSString *bssid = [myDictionnary objectForKey:@"BSSID"]; 
NSLog(@"BSSID : %@", bssid); 
+0

它崩潰應用程式錯誤'異常:EXC_BAD_ACCESS(代碼= 2,地址=爲0x0))' – 2014-01-28 10:43:26

+0

東西爲空,哪一行是什麼呢? – Larme 2014-01-28 10:53:18

+0

'(__bridge_transfer id)CNCopySupportedInterfaces()'返回nil – 2014-01-28 10:54:53