TechnologiesMaps & Location

CoreLocation

iOSmacOStvOSwatchOSvisionOS

CoreLocation reports a device's geographic location and heading, monitors regions, and ranges Bluetooth beacons while respecting privacy-aware authorization. You configure a CLLocationManager and adopt CLLocationManagerDelegate to receive location updates, CLHeading, and CLVisit events, requesting access through CLAuthorizationStatus and CLAccuracyAuthorization. Use CLCircularRegion and CLBeaconRegion with CLBeacon and CLBeaconIdentityConstraint to track entry into geographic and beacon areas, and CLMonitor with CLCondition to observe conditions over time. CLGeocoder converts between coordinates and CLPlacemark values, while errors surface through CLError.

Essentials 2

The central manager and delegate used to start, configure, and receive location services.

  • Cl
    CLLocationManageriOS 2.0+
    An object that starts and stops the delivery of location, heading, region, and beacon events.
  • Pr
    CLLocationManagerDelegate
    Methods that you implement to receive location, heading, authorization, and region events from a location manager.

Location and Heading Data 3

Value types that report a device's position, movement updates, and compass heading.

  • St
    CLLocationUpdateiOS 17.0+
    A structure that contains a device's current location and the state of an ongoing location update.
  • Cl
    CLHeadingiOS 3.0+
    An object that reports the direction in which a device points, relative to magnetic and true north.
  • Cl
    CLVisitiOS 8.0+
    An object that describes a place a user visited, with its location, arrival, and departure times.

Authorization 2

Status and accuracy values that describe the app's permission to use location.

  • En
    CLAuthorizationStatus
    Constants that indicate whether the app is authorized to use location services.
  • En
    CLAccuracyAuthorization
    Constants that indicate whether the app has access to full or reduced location accuracy.

Background Sessions 2

Sessions that keep location updates running while the app is in the background.

  • Cl
    CLBackgroundActivitySession
    An object that keeps location updates active while the app runs in the background.
  • Cl
    CLServiceSession
    An object that represents an active session of location-service access for the app.

Region and Condition Monitoring 4

Types for monitoring geographic regions and observing conditions over time.

  • Cl
    CLRegioniOS 4.0+
    An abstract object that defines a monitored geographic area for entry and exit events.
  • Cl
    CLCircularRegion
    An object that defines a circular geographic region by its center coordinate and radius.
  • Ac
    CLMonitor
    An actor that monitors a set of conditions and reports changes in their state over time.
  • Pr
    CLCondition
    A protocol for conditions that a location monitor observes and evaluates.

Beacon Ranging 4

Types that identify, constrain, and range nearby Bluetooth iBeacon devices.

  • Cl
    CLBeaconRegion
    An object that defines a region used to detect and range Bluetooth iBeacon devices.
  • Cl
    CLBeaconiOS 7.0+
    An object that represents a detected Bluetooth iBeacon and its proximity to the device.
  • Cl
    CLBeaconIdentityConstraint
    An object that specifies the identity values used to match beacons during ranging.
  • En
    CLProximityiOS 7.0+
    Constants that indicate the relative distance of a device from a detected beacon.

Geocoding 2

Conversion between geographic coordinates and human-readable place information.

  • Cl
    CLGeocoder
    An object that converts between geographic coordinates and human-readable place information.
  • Cl
    CLPlacemark
    An object that holds place information such as country, locality, and street for a coordinate.

Location Push Extensions 2

Extension and identity support for delivering location updates through push notifications.

  • Pr
    CLLocationPushServiceExtensioniOS 15.0+
    A protocol for an extension that handles location requests delivered through push notifications.
  • Pr
    CLBodyIdentifiableiOS 27.0+
    A protocol for types that provide an identifier within a location push service payload.

Configuration 2

Enumerations that tune location behavior for an activity and device orientation.

  • En
    CLActivityType
    Constants that describe the kind of activity for which the app uses location data.
  • En
    CLDeviceOrientation
    Constants that describe the physical orientation of the device for heading calculations.

Errors 2

Error types that describe failures in location and push service operations.

  • St
    CLError
    A structure that describes errors returned by Core Location services.
  • St
    CLLocationPushServiceErroriOS 15.0+
    A structure that describes errors returned by the location push service.

Enumerations 1

  • En
    CLRegionStateiOS 7.0+

Type Aliases 4

  • Ty
    CLBeaconMajorValue
  • Ty
    CLBeaconMinorValue
  • Ty
    CLGeocodeCompletionHandler
  • Ty
    CLHeadingComponentValue
← Maps & Location