检测特定的 wifi 网络是否在可达范围内
我正在为当地展览开发一个应用程序,其中一些内容仅限于在该地点时可用。
我想知道如何检测特定 wifi 网络的存在并连接到它。有任何关于如何编码的线索吗?
我已经尝试过 9Bit Labs 的 Snap 这是一个完整的成熟的端口扫描器,因此可以做到这一点,但完整的端口扫描器对于我的场景来说可能有点过分了。仅需搜索一个名称,例如“local-exhibition”。
I'm working on an app for a local exhibition and some of the content is restricted to only being available when being at the location.
I wonder how one can detect presence of a particular wifi-network and connect to it. Any clues how to code it?
I have tried Snap by 9Bit Labs which is a full blown port scanner, so it is possible to do it, but a full blown port scanner is probably overkill for my scenario. Only one name is to be searched for, e.g. "local-exhibition".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能。 iOS 中没有 API 允许您连接到受用户控制的特定 WiFi 网络。像 Snap 这样的端口扫描仪也无济于事,因为它找不到 WiFi 网络,它只是扫描您的设备已连接到的网络上的主机。
You cannot. There is no API in iOS that will allow you to connect to a particular WiFi network, that is under your user's control. A port scanner like Snap cannot help either, as it doesn't find WiFi networks, it just scans for hosts on the one that your device is already connected to.