Accessing iPhone WiFi Information via SDK

2020-01-24 09:06发布

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.

Only interested in Wifi info, not cellular.

3条回答
叛逆
2楼-- · 2020-01-24 09:46

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.

But, if you want to use them anyway, some kind folks have posted a list of discovered Apple80211 functions to google code.

It looks like Apple80211GetInfoCopy might do the trick.

查看更多
forever°为你锁心
3楼-- · 2020-01-24 09:53

According to this it's actually possible since iOS 4.1.

The function is called: CNCopyCurrentNetworkInfo()

Hope that helps.

查看更多
孤傲高冷的网名
4楼-- · 2020-01-24 09:58

The WiFinder iPhone application does it somehow...

查看更多
登录 后发表回答