Framework

Core Location

Determine the current latitude and longitude of a device. Configure and schedule the delivery of location-related events.

Overview

The Core Location framework lets you determine the current location or heading associated with a device. The framework uses the available hardware to determine the user’s position and heading. You use the classes and protocols in this framework to configure and schedule the delivery of location and heading events. You can also use it to define geographic regions and monitor when the user crosses the boundaries of those regions. In iOS, you can also define a region around a Bluetooth beacon.

Symbols

Classes

CLBeacon

The CLBeacon class represents a beacon that was encountered during region monitoring. You do not create instances of this class directly. The location manager object reports encountered beacons to its associated delegate object. You can use the information in a beacon object to identify which beacon was encountered.

CLBeaconRegion

A CLBeaconRegion object defines a type of region that is based on the device’s proximity to a Bluetooth beacon, as opposed to a geographic location. A beacon region looks for devices whose identifying information matches the information you provide. When that device comes in range, the region triggers the delivery of an appropriate notification.

CLCircularRegion

The CLCircularRegion class defines the location and boundaries for a circular geographic region. You can use instances of this class to define geo fences for a specific location. The crossing of a geo fence’s boundary causes the location manager to notify its delegate.

CLFloor

A CLFloor object specifies the floor of the building on which the user is located. In places where floor information can be determined, a CLLocation object may include a floor object along with the regular location data. You do not create instances of this class directly nor should you subclass it.

CLGeocoder

The CLGeocoder class provides services for converting between a coordinate (specified as a latitude and longitude) and the user-friendly representation of that coordinate. A user-friendly representation of the coordinate typically consists of the street, city, state, and country information corresponding to the given location, but it may also contain a relevant point of interest, landmarks, or other identifying information. A geocoder object is a single-shot object that works with a network-based service to look up placemark information for its specified coordinate value.

CLHeading

A CLHeading object contains heading data generated by a CLLocationManager object. The heading data consists of computed values for true and magnetic north. It also includes the raw data for the three-dimensional vector used to compute those values.

CLLocation

A CLLocation object represents the location data generated by a CLLocationManager object. This object incorporates the geographical coordinates and altitude of the device’s location along with values indicating the accuracy of the measurements and when those measurements were made. In iOS, this class also reports information about the speed and heading in which the device is moving.

CLLocationManager

The CLLocationManager class is the central point for configuring the delivery of location- and heading-related events to your app. You use an instance of this class to establish the parameters that determine when location and heading events should be delivered and to start and stop the actual delivery of those events. You can also use a location manager object to retrieve the most recent location and heading data.

CLPlacemark

Associates address information with a geographic location or region.

CLRegion

The CLRegion class defines an abstract area that can be tracked. In iOS, you do not create instances of this class directly; instead, you instantiate subclasses that define specific types of regions. In macOS, you create instances of this class and use them to store the region information. After you create a region, you must register it with a CLLocationManager object. The location manager generates appropriate events whenever the user crosses the boundaries of the region.

CLVisit

A CLVisit object encapsulates information about interesting places that the user has been. Visit objects are created by the system and delivered by the CLLocationManager object to its delegate after you start the delivery of events. The visit includes the location where the visit occurred and information about the arrival and departure times as relevant. You do not create visit objects directly, nor should you subclass CLVisit.

Protocols

CLLocationManagerDelegate

The CLLocationManagerDelegate protocol defines the methods used to receive location and heading updates from a CLLocationManager object.

Structures

Extended Types

See Also