Mac OS X:如何获取所有可用 WiFi 网络的 MAC 地址?

发布于 2025-01-03 18:49:27 字数 163 浏览 1 评论 0 原文

我需要获取WIFI模块建立的所有WIFI网络的MAC地址。收集后,我需要将它们与另一个静态 MAC 地址进行比较,并保存在应用程序中。 我的目标是,仅当您距离路由器足够近时才允许使用该应用程序。

有机会这样做吗?遵守苹果的规则非常重要,因为我想在应用商店中发布该应用程序。 请帮我! 提前致谢!

I need to get the MAC addresses of all WIFI networks which are founded by the WIFI module. After collecting them, I need to compare them with another MAC address, which is static and saved in the app.
My goal is it, to only allow to use the app, if you are close enough at the router.

Is there any chance to do this? And it is very important, to follow Apple's rules, because I want to release the app in the Appstore.
Please help me!
Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伴随着你 2025-01-10 18:49:27
#import <CoreWLAN/CoreWLAN.h>

 CWInterface *currentInterface = [CWInterface interface];
 NSArray *networks = [[currentInterface scanForNetworksWithName:nil error:nil] allObjects];
for (CWNetwork *network in networks) {
      NSLog ( @"SSID: %@, BSSID: %@.\n", [network ssid],[network bssid] ,[network rssiValue]);
}

正如您在这里看到的: http://www.smipple.net/snippet/morph/List%20all%20available%20WiFi-Acess%20points%20with%20SSID%20and%20BSSID%20under%20OS%20X

RSSI 值可以检查您是否距离路由器足够近。

AP MAC 地址 = BSSID
您可以在下面的链接中阅读相关内容:
http://www .juniper.net/documentation/en_US/network-director1.5/topics/concept/wireless-ssid-bssid-essid.html

#import <CoreWLAN/CoreWLAN.h>

 CWInterface *currentInterface = [CWInterface interface];
 NSArray *networks = [[currentInterface scanForNetworksWithName:nil error:nil] allObjects];
for (CWNetwork *network in networks) {
      NSLog ( @"SSID: %@, BSSID: %@.\n", [network ssid],[network bssid] ,[network rssiValue]);
}

As u can see here: http://www.smipple.net/snippet/morph/List%20all%20available%20WiFi-Acess%20points%20with%20SSID%20and%20BSSID%20under%20OS%20X

With the RSSI value u can check if you are close enough to the router.

AP MAC address = BSSID
U can read about that at the link below:
http://www.juniper.net/documentation/en_US/network-director1.5/topics/concept/wireless-ssid-bssid-essid.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文