Is there a way using the iPhone SDK to get WiFi information? Things like Signal Strength, WiFi Channel and SSID are the main things I'm looking for.
有没有办法使用iPhone SDK获取WiFi信息?像Signal Strength,WiFi Channel和SSID这样的东西是我正在寻找的主要内容。
Only interested in Wifi info, not cellular.
只对Wifi信息感兴趣,而不是蜂窝信息。
3 个解决方案
#1
12
Based on this bug report and this SO question, I'm guessing there's no supported way to do this atm.
根据这个错误报告和这个问题,我猜测没有支持的方法来执行此操作。
EDIT: Chris mentioned WiFinder, which prompted me to do a little more digging. According to the WiFinder author's blog he used methods from the private Apple80211.framework. (The framework mentioned in the above linked SO question.) Apparently Apple will no longer allow these private API calls in apps, which is preventing him from updating WiFinder.
编辑:克里斯提到了WiFinder,这促使我做了一点挖掘。根据WiFinder作者的博客,他使用私人Apple80211.framework的方法。 (上面链接的SO问题中提到的框架。)显然Apple将不再允许在应用程序中使用这些私有API调用,这阻止了他更新WiFinder。
But, if you want to use them anyway, some kind folks have posted a list of discovered Apple80211 functions to google code.
但是,如果你想要使用它们,某些人已经发布了一个已发现的Apple80211功能列表到谷歌代码。
It looks like Apple80211GetInfoCopy
might do the trick.
看起来Apple80211GetInfoCopy可能会成功。
#2
12
According to this it's actually possible since iOS 4.1.
根据这个,它实际上可以从iOS 4.1开始。
The function is called: CNCopyCurrentNetworkInfo()
该函数被称为:CNCopyCurrentNetworkInfo()
Hope that helps.
希望有所帮助。
#3
1
The WiFinder iPhone application does it somehow...
WiFinder iPhone应用程序以某种方式做到了......
#1
12
Based on this bug report and this SO question, I'm guessing there's no supported way to do this atm.
根据这个错误报告和这个问题,我猜测没有支持的方法来执行此操作。
EDIT: Chris mentioned WiFinder, which prompted me to do a little more digging. According to the WiFinder author's blog he used methods from the private Apple80211.framework. (The framework mentioned in the above linked SO question.) Apparently Apple will no longer allow these private API calls in apps, which is preventing him from updating WiFinder.
编辑:克里斯提到了WiFinder,这促使我做了一点挖掘。根据WiFinder作者的博客,他使用私人Apple80211.framework的方法。 (上面链接的SO问题中提到的框架。)显然Apple将不再允许在应用程序中使用这些私有API调用,这阻止了他更新WiFinder。
But, if you want to use them anyway, some kind folks have posted a list of discovered Apple80211 functions to google code.
但是,如果你想要使用它们,某些人已经发布了一个已发现的Apple80211功能列表到谷歌代码。
It looks like Apple80211GetInfoCopy
might do the trick.
看起来Apple80211GetInfoCopy可能会成功。
#2
12
According to this it's actually possible since iOS 4.1.
根据这个,它实际上可以从iOS 4.1开始。
The function is called: CNCopyCurrentNetworkInfo()
该函数被称为:CNCopyCurrentNetworkInfo()
Hope that helps.
希望有所帮助。
#3
1
The WiFinder iPhone application does it somehow...
WiFinder iPhone应用程序以某种方式做到了......