Reputation: 3787
in iOS 4.x, there were APIs about my requirement, But it seems changed into private in 5.x, And It seems to removed in 6.x. (Actually it seems can't be called in sandbox)
Getting SSID list for 802.11 is very essential idea for our new project.
Upvotes: 2
Views: 1220
Reputation: 1202
This code work well in order to get SSID.
#import <SystemConfiguration/CaptiveNetwork.h>
@implementation IODAppDelegate
@synthesize window = _window;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
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);
// Override point for customization after application launch.
return YES;
}
And this is the results :
Connected at:{
BSSID = 0;
SSID = "Eqra'aOrange";
SSIDDATA = <45717261 27614f72 616e6765>;
}
Upvotes: 3
Reputation: 3787
I believe that there is no solution for this. the reason is:
Even user disabled location service, an App which accesses SSID list(actually BSSID) can infer location of user by using skyhook or something similar solution.
This information is not confirmed by Apple, But I'm pretty sure about it.
Upvotes: 2