Framework

Core Location

Obtain the geographic location and orientation of a device.

Overview

The Core Location framework 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.

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.

Symbols

First Steps

CLLocationManager

The central class for configuring the delivery of location-related events to your app.

CLLocationManagerDelegate

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

Location Updates

CLLocation

A data object containing the latitude, longitude, and course information reported by the system.

CLFloor

A data object that identifies the floor of a building on which the device is located.

CLVisit

A data object that identifies the user's location during a specific period of time

CLLocationCoordinate2D

A structure that contains a geographical coordinate using the WGS 84 reference frame.

CLLocationDegrees

A latitude or longitude value specified in degrees.

CLLocationDistance

A distance measurement (in meters) from an existing location.

CLLocationAccuracy

The accuracy of a coordinate value, measured in meters.

Region Monitoring

CLCircularRegion

A geographic region that is defined by a center point and radius.

CLRegion

An abstract class for defining an area that can be tracked.

iBeacon

CLBeacon

A data object containing information about a detected iBeacon and the relative distance to it.

CLBeaconRegion

A region used to detect iBeacon hardware.

Compass Headings

CLHeading

A data object containing a device's azimuth relative to true or magnetic north.

Geocoding

CLGeocoder

A single-shot object for converting between geographic coordinates and place names.

CLPlacemark

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

Errors

CLError

A Core Location error.

CLError.Code

Error codes returned by the location manager object.

let kCLErrorUserInfoAlternateRegionKey: String

A key in the user information dictionary of an regionMonitoringResponseDelayed error whose value is a CLRegion object that the location services can more effectively monitor.

kCLErrorDomain

The domain for Core Location errors.

See Also