25

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.

MrValdez
  • 8,515
  • 10
  • 56
  • 79
JamesSugrue
  • 14,891
  • 10
  • 61
  • 93

3 Answers3

13

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

The function is called: CNCopyCurrentNetworkInfo()

Hope that helps.

Community
  • 1
  • 1
mhl666
  • 874
  • 8
  • 15
  • 1
    But not enough information. I hope Apple releases some API even for their own Airports. – IBG Jan 25 '12 at 10:29
  • With iPhone 5c os7.1 this method not use full. I try and get CFDictionaryRef is null – vualoaithu Apr 16 '14 at 07:26
  • it not use full for iphone 5S os 7.1 , help me get it – vualoaithu Apr 21 '14 at 09:48
  • 2
    This is very misleading. This API is not for any WiFi network such as your home or office network. This is only for captive networks such as networks that require user interaction (like opening a webpage for capturing username and password) before connecting to the Internet. You might have seen the captive networks in hotels and restaurants. – Prabu Arumugam Jul 01 '14 at 16:54
12

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.

Community
  • 1
  • 1
Gordon Wilson
  • 26,244
  • 11
  • 57
  • 60
  • 1
    Until a few weeks ago there were an application called WifiTrak (bitrino.com/wifitrak/support.html) on the appstore which displayed a list of all available wi-fi hotspots in range. It has however been pulled from the appstore, so even though it appeared that this is possible it might not be acceptable by Apple for whatever reason. – leviathan Jul 14 '10 at 08:46
  • it not use for iphone 5S OS7 – vualoaithu Apr 17 '14 at 02:25
  • The Blog article is cached here: https://web.archive.org/web/20090220171732/http://larsbergstrom.wordpress.com/2008/11/03/on-the-lack-of-wifinder-updates/ – Tilo Jan 10 '17 at 21:42
1

The WiFinder iPhone application does it somehow...

Chris Nava
  • 6,614
  • 3
  • 25
  • 31
  • Nice find. See my edits for the WiFinder authors issues w/using the private Apple80211.framework – Gordon Wilson Jan 05 '09 at 16:54
  • 1
    WiFinder is using a database of WiFi's whose locations are stored in the database. IMHO this is not the answer to the initial question, because the WiFinder App just helps to locate the user based on his GPS position and determines the distance to the WiFi stations stored in the database. – leviathan Jul 14 '10 at 09:19
  • 3
    The API was closed by Apple so the app was changed since my initial post. It no longer gets signal strength info for WiFi. – Chris Nava Jul 14 '10 at 18:27