Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
774 views
in Technique[技术] by (71.8m points)

objective c - iOS Get list of all WiFi networks

This is not a duplicate of the dozens of similar questions (too many to list) because I have evidence that it is possible to publish an app that displays a list of wifi networks.

So, it has been widely accepted and understood that you cannot get a list of all wifi networks without using a private api. The use of a private api will cause an app to be rejected from app store review.

However, Google did it recently in their Google Home app that was released on 10/26/2016, so it must be possible now. How?!?

Note- their App Store listing says the app supports iOS 8.0 or later. I need to further test if this functionality only exists on the iOS 10 version of the app, or if it in fact also exists on iOS 8 and 9.
(I grayed out my wifi name and mac address in the image)

enter image description here

I'm using Objective-C, so if you submit a solution in Swift, please submit an ObjC one too!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This might be possible with NetworkExtension (available since iOS 8). But you need the com.apple.developer.networking.HotspotHelper-entitlement in you app to use these APIs. To get these entitlement, you have to contact Apple and describe, why you need it.

I haven't found any code examples, but maybe the documentation of NetworkExtension helps you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...