Core Location

Obtain the geographic location and orientation of a device.


Core Location provides services for determining a device’s geographic location, altitude, orientation, or position relative to a nearby iBeacon. The framework uses all available onboard hardware, including Wi-Fi, GPS, Bluetooth, magnetometer, barometer, and cellular hardware to gather data.

The first time that your app requests authorization, its authorization status is indeterminate and the system prompts the user to grant or deny the request (as shown in Figure 1). The system records the user's response and does not display this panel upon subsequent requests.

Figure 1

Requesting authorization to use location services

Requesting authorization to use location services

After requesting permission and determining whether services are available, you start most services using the CLLocationManager object and receive the results in your associated delegate object.


First Steps

Before gathering location data, you must ask for permission to use location services and determine the availability of those services on the current device.

Choosing the Authorization Level for Location Services

Choose the appropriate level of access to location data for your app.

Determining the Availability of Location Services

Determine which location services are active and available on the user’s device.


The object that you use to start and stop the delivery of location-related events to your app.


The methods that you use to receive events from an associated location manager object.

Location Updates

Getting the User's Location

Learn how to receive location data in your app.


The latitude, longitude, and course information reported by the system.


The latitude and longitude associated with a location, specified using the WGS 84 reference frame.


The floor of a building on which the user's device is located.


Information about the user's location during a specific period of time.

Region Monitoring

Configure geofences and receive notifications when the user's device crosses the fence's boundaries.

Monitoring the User's Proximity to Geographic Regions

Use region monitoring to determine when the user enters or leaves a geographic region.


A circular geographic region, specified as a center point and radius.


A base class representing an area that can be monitored.


Determining the Proximity to an iBeacon Device

Learn how to detect beacons and determine the relative distance to them.

Turning an iOS Device into an iBeacon Device

Learn how to broadcast iBeacon signals from an iOS device.


Information about an observed iBeacon and its relative distance to the user’s device.


A region used to detect the presence of iBeacon devices.

Compass Headings

Determine the device’s orientation relative to magnetic or true north.

Getting Heading and Course Information

Use a device’s orientation and course information for navigation.


The azimuth (orientation) of the user’s device, relative to true or magnetic north.


Converting Between Coordinates and User-Friendly Place Names

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


An interface for converting between geographic coordinates and place names.


A user-friendly description of a geographic coordinate, often containing the name of the place, its address, and other relevant information.



Error codes returned by the location manager object.


A key in the user information dictionary of an error relating to a delayed region monitoring response.


The domain for Core Location errors.



Identity characteristics that can match one or more beacons.


See Also

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software