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

# locationServicesEnabled()

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

```
class func locationServicesEnabled() -> Bool
```

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if location services are enabled on the device; <doc://com.apple.documentation/documentation/Swift/false> if they are not.

## Discussion

Users can enable or disable location services by toggling the Location Services switch in Settings > Privacy.

- When users disable the switch, the system calls your delegate’s [`locationManager(_:didChangeAuthorization:)`](/documentation/CoreLocation/CLLocationManagerDelegate/locationManager(_:didChangeAuthorization:)) method with a denied authorization status ([`CLAuthorizationStatus.denied`](/documentation/CoreLocation/CLAuthorizationStatus/denied)).
- When users enable the switch, the system returns your app’s authorization to its previous state and calls your delegate’s [`locationManager(_:didChangeAuthorization:)`](/documentation/CoreLocation/CLLocationManagerDelegate/locationManager(_:didChangeAuthorization:)) method.

You are not required to call [`locationServicesEnabled()`](/documentation/CoreLocation/CLLocationManager/locationServicesEnabled()). However, If you wish to display instructions about enabling location services, you may check the return value of this method to find out if the services are disabled for the entire device, or just for your app.  If the result is `true`, provide instructions for enabling services for your app; otherwise, provide instructions for enabling the Location Services switch in Settings > Privacy.

If users disable or deny location services and you attempt to start location updates anyway, the location manager reports an error to its delegate. See [`locationManager(_:didFailWithError:)`](/documentation/CoreLocation/CLLocationManagerDelegate/locationManager(_:didFailWithError:)) and [`locationManager(_:monitoringDidFailFor:withError:)`](/documentation/CoreLocation/CLLocationManagerDelegate/locationManager(_:monitoringDidFailFor:withError:)) for more information.

## Topics

### Related Documentation

[`locationManager(_:didFailWithError:)`](/documentation/CoreLocation/CLLocationManagerDelegate/locationManager(_:didFailWithError:))

Tells the delegate that the location manager was unable to retrieve a location value.

[`locationManager(_:monitoringDidFailFor:withError:)`](/documentation/CoreLocation/CLLocationManagerDelegate/locationManager(_:monitoringDidFailFor:withError:))

Tells the delegate that a region monitoring error occurred.



---

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)