-->

How to fetch the list of near by wifi networks and

2019-02-28 09:22发布

问题:

I want to fetch the list of near by wifi networks and able to connect to them from our App in ios, and my Application is Enterprise App so even private api's is also fine. Stuck this issue since 2 weeks, please provide me some references..

回答1:

What you require will only work on JailBroken devices, the blog(blog.guvenergokce.com/iphone-wireless-scanner-ios5/170) which @Ckouta referred also has one comment from the Blog Admin,

I’m assuming that your device is already jailbroken (otherwise not possible) You shall create release build of sample app and upload release build in to /Applications folder. (you can use open ssh for that )



回答2:

Public API allows you to have only information about the current wifi used by your device using CNCopyCurrentNetworkInfo

In order to fetch all the wifi available in your area, take a look at: Stumbler which is using MobileApple80211. I think, it handles what you are looking for. Moreover, you can also use it to connect your device to a specific wifi. You can find a good example of what you need here (answer #9)

Just keep in mind, if you are using private API, your app will be rejected by Apple.



回答3:

Although it's late but have a look at this link. You can do what you want with the use of MobileWifi.framework and thanks to Cykey there are some reversed headers to use. I have done what you want myself using the link above:)