Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can the iPhone SDK obtain the Wi-Fi SSID currently connected to?

Tags:

ios

iphone

wifi

In the iPhone SDK I don't see the same SCDynamicStore used on Mac OS X to get the SSID name that your wireless network is currently connected to isn't available.

Is there a way to get the SSID name that the iPhone is currently connected to?

I see some apps do it (Easy Wi-Fi for AT&T for one) but I can't find how it's done in the iPhone SDK docs. A private or unpublish method would be acceptable just as a proof of concept (although I know that likely wouldn't make it to the AppStore).

like image 378
danimal Avatar asked Dec 03 '08 23:12

danimal


People also ask

Can an app see my SSID?

Yes, an app can see all surrounding WiFi SSIDs with correct permissions. This is the main use case for WiFi analyzer apps (not affiliated, just to show as an example, have been using one of the listed apps).

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

It is not possible to get all the available wifi networks names and information. BUT it is only possible to get the SSID ( SSID is simply the technical term for a network name) of the network that you are currently connected to. To test this you need a physical device (iPhone) connected to your pc. Save this answer.

What is the SSID of a network iOS?

A service set identifier (SSID) is a sequence of characters that uniquely names a wireless local area network (WLAN). An SSID is sometimes referred to as a "network name." This name allows stations to connect to the desired network when multiple independent networks operate in the same physical area.


2 Answers

This is now possible (iOS 4.1+) via the Captive Network API.

See an example of how to use it on this similar question.

This is not a private API.

like image 187
Nate Avatar answered Nov 15 '22 21:11

Nate


After digging around I found the anser to this. There are unpublished APIs in the Preferences framework. For examples of this one can look at the Stumbler code hosted on Google Code.

I filed a radar with Apple (#6407431/OpenRadar version) that was marked as a duplicate of #5814810). If you want this officially supported then please also file a radar at bugreport.apple.com.

Update: The above Stumbler code is for 1.x revision iPhone OS SDK. For iPhone OS 2.0 and beyond developers will have to look in PrivateFrameworks/Apple80211.Framework and all that implies.

like image 28
danimal Avatar answered Nov 15 '22 19:11

danimal