<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreLocation",
  "identifier" : "/documentation/CoreLocation/CLLocationManagerDelegate/locationManager(_:didUpdateTo:from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Location"
    ],
    "preciseIdentifier" : "c:objc(pl)CLLocationManagerDelegate(im)locationManager:didUpdateToLocation:fromLocation:"
  },
  "title" : "locationManager(_:didUpdateTo:from:)"
}
-->

# locationManager(_:didUpdateTo:from:)

Tells the delegate that a new location value is available.

```
optional func locationManager(_ manager: CLLocationManager, didUpdateTo newLocation: CLLocation, from oldLocation: CLLocation)
```

## Parameters

`manager`

The location manager object that generated the update event.

`newLocation`

The new location data.

`oldLocation`

The location data from the previous update. If this is the first update event delivered by this location manager, this parameter is `nil`.

## Discussion

By the time this message is delivered to your delegate, the new location data is also available directly from the [`CLLocationManager`](/documentation/CoreLocation/CLLocationManager) object. The `newLocation` parameter may contain the data that was cached from a previous usage of the location service. You can use the [`timestamp`](/documentation/CoreLocation/CLLocation/timestamp) property of the location object to determine how recent the location data is.

---

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)