2013-03-18 43 views

回答

2

我相信沒有解決方案。其原因是:

即使用戶禁用位置服務,應用程序,其訪問SSID列表(實際上BSSID)可以通過使用天鉤或類似的東西溶液推斷的用戶位置。

此信息未得到Apple的確認,但我很確定。

3

這段代碼很好地工作以獲得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; 
} 

這是結果:

Connected at:{ 
BSSID = 0; 
SSID = "Eqra'aOrange"; 
SSIDDATA = <45717261 27614f72 616e6765>; 

}

相關問題