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

# requestLocation()

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

```
func requestLocation()
```

## Discussion

This method returns immediately. Calling it causes the location manager to obtain a location fix (which may take several seconds) and call the delegate’s [`locationManager(_:didUpdateLocations:)`](/documentation/CoreLocation/CLLocationManagerDelegate/locationManager(_:didUpdateLocations:)) method with the result. The location fix is obtained at the accuracy level indicated by the [`desiredAccuracy`](/documentation/CoreLocation/CLLocationManager/desiredAccuracy) property. Only one location fix is reported to the delegate, after which location services are stopped. If a location fix cannot be determined in a timely manner, the location manager calls the delegate’s [`locationManager(_:didFailWithError:)`](/documentation/CoreLocation/CLLocationManagerDelegate/locationManager(_:didFailWithError:)) method instead and reports a [`CLError.Code.locationUnknown`](/documentation/CoreLocation/CLError-swift.struct/Code/locationUnknown) error.

Use this method when you want the user’s current location but do not need to leave location services running. This method starts location services long enough to return a result or report an error and then stops them again. Calling the [`startUpdatingLocation()`](/documentation/CoreLocation/CLLocationManager/startUpdatingLocation()) or  [`allowDeferredLocationUpdates(untilTraveled:timeout:)`](/documentation/CoreLocation/CLLocationManager/allowDeferredLocationUpdates(untilTraveled:timeout:)) method cancels any pending request made using this method. Calling this method while location services are already running does nothing. To cancel a pending request, call the [`stopUpdatingLocation()`](/documentation/CoreLocation/CLLocationManager/stopUpdatingLocation()) method.

If obtaining the desired accuracy would take too long, the location manager delivers a less accurate location value rather than reporting an error.

When using this method, the associated delegate must implement the [`locationManager(_:didUpdateLocations:)`](/documentation/CoreLocation/CLLocationManagerDelegate/locationManager(_:didUpdateLocations:)) and [`locationManager(_:didFailWithError:)`](/documentation/CoreLocation/CLLocationManagerDelegate/locationManager(_:didFailWithError:)) methods. Failure to do so is a programmer error.

---

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)