我完全同意Jano:蘋果邏輯比其他解決方案更有意義。 反正你可以很容易得到你的WIFI網絡ID:
-(void)LogInfo:(NSDictionary*)info forKey:(NSString*)key;
{
NSString* temp;
temp = [info objectForKey: key];
NSLog(temp);
}
- (void)fetchSSIDInfo
{
NSArray *ifs = (id)CNCopySupportedInterfaces();
NSDictionary* info = nil;
for (NSString *ifnam in ifs)
{
info = (id)CNCopyCurrentNetworkInfo((CFStringRef)ifnam);
NSString *temp = [NSString stringWithFormat:@"%@", [info description]];
[self AddToLog: temp];
[self LogInfo:info forKey:@"BSSID"];
[self LogInfo:info forKey:@"SSID"];
[self LogInfo:info forKey:@"SSIDDATA"];
[info release];
}
[ifs release];
}
好吧,我想我會去只爲在這一次的Android ......至少謝謝你的誠實的答案... :-) –
更好在這裏回答:http://stackoverflow.com/questions/15732181/此外,現在有思科硬件爲此,谷歌「思科移動服務引擎」。 – Jano