如何在 iOS 中获取当前连接的 wifi 频道(频率)? [英] How to get the current connection wifi channel (frequency) in iOS?

查看:641
本文介绍了如何在 iOS 中获取当前连接的 wifi 频道(频率)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在iOS中获取WIFI频道和频率信息.

I want to know how to get WIFI channel and frequency information in iOS.

最好不要从私有 API 获取(因为我需要将其提交到 iTunes Store).

It would be better not to get from the private APIs (because I need to submit it to the iTunes Store).

推荐答案

从 iOS 7 开始,无法使用公开可用的 API 来做到这一点.操作系统算法控制网络并根据拥塞、干扰、以及其他因素.

There's no way to do this using publicly available APIs, as of iOS 7. The OS algorithm controls networking and decides which channel to use based on congestion, interference, and other factors.

如果您可以使用私有 API,那么您可以使用 Stumbler,这是一个公开您感兴趣的数据的库:https://code.google.com/p/iphone-wireless/wiki/Stumbler

If you're okay with using private APIs, then you can use Stumbler, a library that exposes the data you're interested in: https://code.google.com/p/iphone-wireless/wiki/Stumbler

警告:如果您想使用私有 API,那么您将无法通过 App Store 进行分发(并且您将面临使用 Apple 私有 API 带来的所有其他危害:banhammer,随时破损等).

Warning: If you want to use private APIs, then you won't be able to distribute through the App Store (and you'll have all the other hazards that come with using Apple's private API: the banhammer, breakage at any time, et cetera).

这篇关于如何在 iOS 中获取当前连接的 wifi 频道(频率)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆