Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS API detect wireless networks

Is there an API in CocoaTouch/iOS for detecting wireless networks? I want to write an app that saves a list of networks the phone can see at a given moment.

like image 906
Andrew J. Brehm Avatar asked Oct 20 '10 11:10

Andrew J. Brehm


People also ask

Is there any API available for iOS to scan Wi-Fi networks?

On iOS devices there is no public API for scanning WiFi networks.

How do I detect wireless networks?

After your Surface restarts, sign in to Windows. Go to Start, and select Settings > Network & internet > Wi-Fi > Show available networks, and see whether your wireless network name appears in the list of available networks. If you see your wireless network name, select it and select Connect.

How can I get a list of available Wi-Fi networks from iOS app?

To do this, open System Preferences, and then click Network. Select Wi-Fi in the sidebar, and then click Advanced. In the Wi-Fi tab, you will see a list of networks. This list is mainly there so you can choose an order of preference for joining networks.

How do I find known networks on iOS?

From the Wi-Fi settings, tap the new "Edit" button and authenticate yourself using Face ID, Touch ID, or your passcode. Once authenticated, you'll see a list of Known Networks, which are all of the hotspots you've saved to your iPhone or iCloud Keychain from your other Apple devices.


1 Answers

As far as I know you can get the information about the current connected Wi-Fi using CNCopySupportedInterfaces and CNCopyCurrentNetworkInfo of CaptiveNetwork. You can refer to: How do I use CaptiveNetwork to get the current WiFi Hotspot Name for more information.

According to iPhone get a list of all SSIDs without private library:

Without the use of private library (Apple80211) you can only get the SSID of the network your device is currently connected to.

You could have a look at iphone-wireless project if you are interested in Apple80211. There exists a sample app "Stumber" which does exactly what you want. But you cannot use this in your app if you want to publish to App Store because as it uses private APIs

like image 173
Ali Avatar answered Oct 05 '22 06:10

Ali