---
title: "setLastUsedDate(_:forItemWith:completion:)"
framework: Finder Sync
role: symbol
role_heading: Instance Method
platforms: [macOS 10.10+]
path: "findersync/fifindersynccontroller/setlastuseddate(_:foritemwith:completion:)"
---

# setLastUsedDate(_:forItemWith:completion:)

## Declaration

```swift
func setLastUsedDate(_ lastUsedDate: Date, forItemWith itemURL: URL, completion: @escaping @Sendable (any Error) -> Void)
```

```swift
func setLastUsedDate(_ lastUsedDate: Date, forItemWith itemURL: URL) async -> any Error
```

## Overview

Overview note: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: func setLastUsedDate(_ lastUsedDate: Date, forItemWith itemURL: URL) async -> Error For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.
