I wanted to take some time to talk about the location indicator on the iPhone, as there’s quite a bit of confusion about what it means. Let me start by talking about the 3 main types of location information available on the iPhone.
- GPS. Most accurate (5m) when outside, with an extremely high battery impact.
- WiFi. Most accurate (10m) when inside, with a high battery impact
- Cell tower. Rarely accurate (around 500 to 2000m), with very little battery impact
It’s also important to know about the 2 main types of location services available in the background on iOS 4.0 and above
- Core Location. This allows you to receive location updates of a desired accuracy or better, ad infinitum. To utilize Core Location in the background you must specify the application as requiring the location background mode. This then informs the user that the application will likely have a high battery impact. This mode is designed for applications such as turn-by-turn directions.
- Significant Location updates. This allows the application to be notified whenever the device changes cell towers. At that point the application can ask the operating system for a limited time (typically up to 10 minutes) to do any processing. This may include Core Location updates as shown above.
Now, with all that knowledge, let’s look at how things changed from iOS 4.0 to iOS 4.1
iOS 4.0: Show the arrow only when Core Location is running i.e. high battery impact
This really allows user to know when an application is going to significantly impact their battery life, allowing them to turn off such applications. Most application using Core Location will turn it on in such a way that it ends up activating the WiFi or GPS radios.
iOS 4.1: Show the arrow when either Core Location or Significant Location services are running i.e. privacy impact
This educates the user more about privacy – they can know whether any application currently has access to their location. But just because the arrow is there doesn’t mean the phone is actually processing anything, it may be entirely dormant.
Many people got used to the idea that the little location arrow would only appear when the GPS was running. As of iOS 4.1 this is no longer the case.
Any application that is currently registered Significant Location updates will have the arrow visible at all times, even if the phone is stationary and dormant.
Interesting side note
Turning off Location Services for a given app doesn’t completely turn it off.
For those who don’t know how, the standard way is to go to Settings->General->Location Services. You can either turn off location for all applications, or for an individual application. You’ll also see an arrow next to any application that has requested location data in the last 24 hours.
What it actually does is cause a callback to fire saying there was an error collecting location data every time location data is collected for another app. Let me illustrate.
1) You are running GoodApp and BadApp on your iPhone
2) You turn off Location Services for BadApp but leave it on for GoodApp
3) Every time GoodApp gets a location, BadApp is told “Sorry, no location for you”.
Of course, I would have expected BadApp just not to receive anything at all. In the current framework, BadApp is actually receiving some form of data: that another application is accessing location and the phone is likely to be moving.
. Yes there are more complexities to interactions between these types, and some cell tower information is available even when no cell signal is available. However I considered that outside the scope of this article.
. There are additional hacks to gaining background location using various other background modes, jailbreaking, or other techniques. The vast majority of iPhone location-based apps use one or both of the 2 mentioned.