How does the iPhone learn new WiFi locations in terms of using them for location estimates

I know the iPhone can and does use WiFi proximity to get approximate location. This obviously only can occur when some database in the sky knows the approximate location of that WiFi hotspot. My question is how do hotspots get into that db? Is it automatically added whenever the iPhone has a reasonably accurate GPS position and detects the WiFi or is there some manual or programatic way of adding hotspots?


Apple uses their own database since iOS 3.2 (prior to that they used Skyhook Wireless). This works by sending WiFi MAC addresses to Apple by GPS-enabled iOS devices. So if the device has a GPS fix, it automatically sends all WiFi MAC addresses it sees alongside with the GPS-detected location to Apple. There's no option to change this behavior except the master Core Location switch. Users have to accept this transmission of seen WiFi MAC addresses in the EULA.

Location detection via WiFi works the opposite way by sending all seen WiFi MAC addresses to Apple and they respond with the location. Actually they heavily optimize this by caching as many WiFi addresses on the phone as possible. So this even works (to some degree) on iPod touch without any network connectivity.

A weak spot of this algorithm are MiFi and similar devices (relocating WiFi hotspots). Currently, Core Location does not do a very good job of discarding obviously wrong WiFi locations. For instance, on indoor trade shows without GPS reception, be prepared to get wrong location updates because of the many MiFi devices out there.

To respond to your question about manually adding WiFi hotspots: no, there's no way to do that. Just use a GPS enabled iPhone/iPad running iOS 3.2 or higher and the MAC address will make its way into the database eventually. In my experience, this happens rather quickly.

The iPhone uses Skyhook Wireless for determining WiFi location. You can submit your information using their submission page.


Apparently this is no longer true. Apple seems to aggregate this data from iOS devices directly now. See the comments.

Need Your Help

How can I improve my Twitter streaming crawler?

perl twitter

I did a Twitter crawler using the Streaming API. It is programmed in perl using the Net:Twitter:Stream. I think it is retrieving few tweets. I left it tracking TV series tweets last night and I got...

JQuery Draggable Droppable and Sortable at the same time for DOM Manipulation

javascript jquery jquery-ui drag-and-drop

I am trying to setup somme kind of drag and drop wysiwyg editor using JQuery UI.