Handling Location Events in the Background

Take advantage of background execution modes to respond to location-related events at any time.


Most location services are meant to be used while your app is in the foreground, but some can also run in the background or even cause your app to be launched. To receive events in the background, configure the Location updates capability for your app in Xcode, as shown in Figure 1. You must also set the allowsBackgroundLocationUpdates property of your CLLocationManager object to YES.

Figure 1

Enabling background location updates

The capabilities pane in which you enable background location updates

When the system launches your app, use the launch options dictionary passed to the application:willFinishLaunchingWithOptions: and application:didFinishLaunchingWithOptions: methods to determine whether your app was launched to handle a location update. This dictionary contains the UIApplicationLaunchOptionsLocationKey key when the app is launched because of location services. Create a new CLLocationManager object, configure it with a delegate, and start location services again to receive the update.

Table 1 lists the services that launch your app to report new location updates. Services that cause an app to be relaunched do so even after the user force-quits the app

Table 1

Services that relaunch your app after it has been terminated


Launches app

Standard location service


Significant-change location service


Visits service


Region monitoring


iBeacon ranging


Heading service


See Also

Related Topics

Using the Visits Location Service

Get location updates in the most power-efficient way, but less frequently than with other services.

Using the Significant-Change Location Service

Get location updates in a power-friendly way, but less frequently than with the standard location service.

Using the Standard Location Service

Get regular location updates based on the parameters you specify.

Converting Between Coordinates and User-Friendly Place Names

Convert between a latitude/longitude pair and a more user-friendly description of that location.

Converting a User's Location to a Descriptive Placemark

Transform the user’s location displayed on a map into an informative description.