I want to get some uniqe information about access points. Such as MAC address and intensity. I try to do triangle with most three intensity wireless access point in objective c. I have xcode 4.3.2 and ios 5.1. How can I do this in ios.
Asked
Active
Viewed 3,698 times
1 Answers
1
Look there
Try this :
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);
-
it crashes app with error `Exception: EXC_BAD_ACCESS (code=2, address=0x0))` – Julian Jan 28 '14 at 10:43
-
Something is null, which line exactly? – Larme Jan 28 '14 at 10:53
-
`(__bridge_transfer id)CNCopySupportedInterfaces()` returns nil – Julian Jan 28 '14 at 10:54