<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreLocation",
  "identifier" : "/documentation/CoreLocation/CLLocationManager",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Location"
    ],
    "preciseIdentifier" : "c:objc(cs)CLLocationManager"
  },
  "title" : "CLLocationManager"
}
-->

# CLLocationManager

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

```
class CLLocationManager
```

## Overview

A [`CLLocationManager`](/documentation/CoreLocation/CLLocationManager) object is the central place to manage your app’s location-related behaviors. Use a location-manager object to configure, start, and stop location services. You might use these services to:

- Track large or small changes in the user’s current location with a configurable degree of accuracy.
- Report heading changes from the onboard compass.
- Monitor geographical regions of interest and generate events when someone enters or leaves those regions.
- Report the range to nearby Bluetooth beacons.

Create one or more location-manager objects in your app and use them where you need location data. After you create a location-manager object, configure it so that Core Location knows how often to report location changes. In particular, configure the [`distanceFilter`](/documentation/CoreLocation/CLLocationManager/distanceFilter) and [`desiredAccuracy`](/documentation/CoreLocation/CLLocationManager/desiredAccuracy) properties with values that reflect your app’s needs.

A [`CLLocationManager`](/documentation/CoreLocation/CLLocationManager) object reports all location-related updates to its [`delegate`](/documentation/CoreLocation/CLLocationManager/delegate) object, which is an object that conforms to the [`CLLocationManagerDelegate`](/documentation/CoreLocation/CLLocationManagerDelegate) protocol. Assign the delegate immediately when you configure your location manager, because the system reports the app’s authorization status to the delegate’s [`locationManagerDidChangeAuthorization(_:)`](/documentation/CoreLocation/CLLocationManagerDelegate/locationManagerDidChangeAuthorization(_:)) method after the location manager finishes initializing itself.  Core Location calls the methods of your delegate object using the <doc://com.apple.documentation/documentation/Foundation/RunLoop> of the thread on which you initialized the [`CLLocationManager`](/documentation/CoreLocation/CLLocationManager) object. That thread must itself have an active <doc://com.apple.documentation/documentation/Foundation/RunLoop>, like the one found in your app’s main thread.

For more information, see [Configuring your app to use location services](/documentation/CoreLocation/configuring-your-app-to-use-location-services).

## Topics

### Determining the availability of services

[`class func significantLocationChangeMonitoringAvailable() -> Bool`](/documentation/CoreLocation/CLLocationManager/significantLocationChangeMonitoringAvailable())

Returns a Boolean value indicating whether the significant-change location service is available on the device.

[`class func headingAvailable() -> Bool`](/documentation/CoreLocation/CLLocationManager/headingAvailable())

Returns a Boolean value indicating whether the location manager is able to generate heading-related events.

[`var isAuthorizedForWidgetUpdates: Bool`](/documentation/CoreLocation/CLLocationManager/isAuthorizedForWidgetUpdates)

A Boolean value that indicates whether a widget is eligible to receive location updates.

[`var accuracyAuthorization: CLAccuracyAuthorization`](/documentation/CoreLocation/CLLocationManager/accuracyAuthorization)

A value that indicates the level of location accuracy the app has permission to use.

[`class func isMonitoringAvailable(for: AnyClass) -> Bool`](/documentation/CoreLocation/CLLocationManager/isMonitoringAvailable(for:))

Returns a Boolean value indicating whether the device supports region monitoring using the specified class.

[`class func isRangingAvailable() -> Bool`](/documentation/CoreLocation/CLLocationManager/isRangingAvailable())

Returns a Boolean value indicating whether the device supports ranging of beacons that use the iBeacon protocol.

[`class func locationServicesEnabled() -> Bool`](/documentation/CoreLocation/CLLocationManager/locationServicesEnabled())

Returns a Boolean value indicating whether location services are enabled on the device.

### Receiving data from location services

[`var delegate: (any CLLocationManagerDelegate)?`](/documentation/CoreLocation/CLLocationManager/delegate)

The delegate object to receive update events.

[`protocol CLLocationManagerDelegate`](/documentation/CoreLocation/CLLocationManagerDelegate)

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

### Requesting authorization for location services

[`func requestWhenInUseAuthorization()`](/documentation/CoreLocation/CLLocationManager/requestWhenInUseAuthorization())

Requests the user’s permission to use location services while the app is in use.

[`func requestAlwaysAuthorization()`](/documentation/CoreLocation/CLLocationManager/requestAlwaysAuthorization())

Requests the user’s permission to use location services regardless of whether the app is in use.

[`func requestTemporaryFullAccuracyAuthorization(withPurposeKey: String, completion: (((any Error)?) -> Void)?)`](/documentation/CoreLocation/CLLocationManager/requestTemporaryFullAccuracyAuthorization(withPurposeKey:completion:))

Requests permission to temporarily use location services with full accuracy and reports the results to the provided completion handler.

[`func requestTemporaryFullAccuracyAuthorization(withPurposeKey: String)`](/documentation/CoreLocation/CLLocationManager/requestTemporaryFullAccuracyAuthorization(withPurposeKey:))

Requests permission to temporarily use location services with full accuracy.

[`var authorizationStatus: CLAuthorizationStatus`](/documentation/CoreLocation/CLLocationManager/authorizationStatus-swift.property)

The current authorization status for the app.

[`enum CLAuthorizationStatus`](/documentation/CoreLocation/CLAuthorizationStatus)

Constants that indicate the app’s authorization to use location services.

  <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSLocationDefaultAccuracyReduced>

  <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSLocationAlwaysAndWhenInUseUsageDescription>

### Specifying distance and accuracy

[`var distanceFilter: CLLocationDistance`](/documentation/CoreLocation/CLLocationManager/distanceFilter)

The minimum distance in meters the device must move horizontally before an update event is generated.

[`let CLLocationDistanceMax: CLLocationDistance`](/documentation/CoreLocation/CLLocationDistanceMax)

A constant indicating the maximum distance.

[`let kCLDistanceFilterNone: CLLocationDistance`](/documentation/CoreLocation/kCLDistanceFilterNone)

A constant indicating that all movement should be reported.

[`typealias CLLocationDistance`](/documentation/CoreLocation/CLLocationDistance)

A distance in meters from an existing location.

[`var desiredAccuracy: CLLocationAccuracy`](/documentation/CoreLocation/CLLocationManager/desiredAccuracy)

The accuracy of the location data that your app wants to receive.

[`typealias CLLocationAccuracy`](/documentation/CoreLocation/CLLocationAccuracy)

The accuracy of a geographical coordinate.

### Running the standard location service

[`func startUpdatingLocation()`](/documentation/CoreLocation/CLLocationManager/startUpdatingLocation())

Starts the generation of updates that report the user’s current location.

[`func stopUpdatingLocation()`](/documentation/CoreLocation/CLLocationManager/stopUpdatingLocation())

Stops the generation of location updates.

[`func requestLocation()`](/documentation/CoreLocation/CLLocationManager/requestLocation())

Requests the one-time delivery of the user’s current location.

[`var pausesLocationUpdatesAutomatically: Bool`](/documentation/CoreLocation/CLLocationManager/pausesLocationUpdatesAutomatically)

A Boolean value that indicates whether the location-manager object may pause location updates.

[`var allowsBackgroundLocationUpdates: Bool`](/documentation/CoreLocation/CLLocationManager/allowsBackgroundLocationUpdates)

A Boolean value that indicates whether the app receives location updates when running in the background.

[`var showsBackgroundLocationIndicator: Bool`](/documentation/CoreLocation/CLLocationManager/showsBackgroundLocationIndicator)

A Boolean value that indicates whether the status bar changes its appearance when an app uses location services in the background.

[`var activityType: CLActivityType`](/documentation/CoreLocation/CLLocationManager/activityType)

The type of activity the app expects the user to typically perform while in the app’s location session.

[`enum CLActivityType`](/documentation/CoreLocation/CLActivityType)

Constants that indicate the type of activity associated with location updates.

### Running the significant change location service

[`func startMonitoringSignificantLocationChanges()`](/documentation/CoreLocation/CLLocationManager/startMonitoringSignificantLocationChanges())

Starts the generation of updates based on significant location changes.

[`func stopMonitoringSignificantLocationChanges()`](/documentation/CoreLocation/CLLocationManager/stopMonitoringSignificantLocationChanges())

Stops the delivery of location events based on significant location changes.

### Running the visits location service

[`func startMonitoringVisits()`](/documentation/CoreLocation/CLLocationManager/startMonitoringVisits())

Starts the delivery of visit-related events.

[`func stopMonitoringVisits()`](/documentation/CoreLocation/CLLocationManager/stopMonitoringVisits())

Stops the delivery of visit-related events.

### Running the heading service

[`func startUpdatingHeading()`](/documentation/CoreLocation/CLLocationManager/startUpdatingHeading())

Starts the generation of updates that report the user’s current heading.

[`func stopUpdatingHeading()`](/documentation/CoreLocation/CLLocationManager/stopUpdatingHeading())

Stops the generation of heading updates.

[`func dismissHeadingCalibrationDisplay()`](/documentation/CoreLocation/CLLocationManager/dismissHeadingCalibrationDisplay())

Dismisses the heading calibration view from the screen immediately.

[`var headingFilter: CLLocationDegrees`](/documentation/CoreLocation/CLLocationManager/headingFilter)

The minimum angular change in degrees required to generate new heading events.

[`let kCLHeadingFilterNone: CLLocationDegrees`](/documentation/CoreLocation/kCLHeadingFilterNone)

A constant indicating that all header values should be reported.

[`typealias CLLocationDegrees`](/documentation/CoreLocation/CLLocationDegrees)

A latitude or longitude value specified in degrees.

[`var headingBody: (any CLBodyIdentifiable)?`](/documentation/CoreLocation/CLLocationManager/headingBody)

A physical body or view that defines the reference orientation for heading calculations.

[`var headingOrientation: CLDeviceOrientation`](/documentation/CoreLocation/CLLocationManager/headingOrientation)

The device orientation to use when computing heading values.

[`enum CLDeviceOrientation`](/documentation/CoreLocation/CLDeviceOrientation)

Constants indicating the physical orientation of the device.

### Running the region-monitoring service

[`var monitoredRegions: Set<CLRegion>`](/documentation/CoreLocation/CLLocationManager/monitoredRegions)

The set of shared regions monitored by all location-manager objects.

[`var maximumRegionMonitoringDistance: CLLocationDistance`](/documentation/CoreLocation/CLLocationManager/maximumRegionMonitoringDistance)

The largest boundary distance that can be assigned to a region.

### Performing beacon ranging

[`func startRangingBeacons(satisfying: CLBeaconIdentityConstraint)`](/documentation/CoreLocation/CLLocationManager/startRangingBeacons(satisfying:))

Starts the delivery of notifications for the specified beacon constraints.

[`func stopRangingBeacons(satisfying: CLBeaconIdentityConstraint)`](/documentation/CoreLocation/CLLocationManager/stopRangingBeacons(satisfying:))

Stops the delivery of notifications for the specified beacon constraints.

[`var rangedBeaconConstraints: Set<CLBeaconIdentityConstraint>`](/documentation/CoreLocation/CLLocationManager/rangedBeaconConstraints)

The set of beacon constraints currently being tracked using ranging.

### Monitoring location push notifications

[`func startMonitoringLocationPushes(completion: ((Data?, (any Error)?) -> Void)?)`](/documentation/CoreLocation/CLLocationManager/startMonitoringLocationPushes(completion:))

Starts monitoring for the delivery of Apple Push Notification service (APNs) location pushes, and provides a device-specific token for sending pushes.

[`func stopMonitoringLocationPushes()`](/documentation/CoreLocation/CLLocationManager/stopMonitoringLocationPushes())

Stops monitoring for Apple Push Notification service (APNs) location pushes.

### Getting recent location and heading data

[`var location: CLLocation?`](/documentation/CoreLocation/CLLocationManager/location)

The most recently retrieved user location.

[`var heading: CLHeading?`](/documentation/CoreLocation/CLLocationManager/heading)

The most recently reported heading.

### Deferring location updates

[`let CLTimeIntervalMax: TimeInterval`](/documentation/CoreLocation/CLTimeIntervalMax)

A value representing an unlimited amount of time.

### Deprecated

[Deprecated symbols](/documentation/CoreLocation/deprecated-symbols)

Review unsupported symbols and their replacements.

### Instance Methods

[`func requestHistoricalLocations(purposeKey: String, sampleCount: Int, completionHandler: ([CLLocation], (any Error)?) -> Void)`](/documentation/CoreLocation/CLLocationManager/requestHistoricalLocations(purposeKey:sampleCount:completionHandler:))

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)