---
title: "values(forAttributes:forItemWith:completion:)"
framework: Finder Sync
role: symbol
role_heading: Instance Method
platforms: [macOS 10.10+]
path: "findersync/fifindersyncprotocol/values(forattributes:foritemwith:completion:)"
---

# values(forAttributes:forItemWith:completion:)

## Declaration

```swift
optional func values(forAttributes attributes: [URLResourceKey], forItemWith itemURL: URL, completion: @escaping @Sendable ([URLResourceKey : Any], (any Error)?) -> Void)
```

```swift
optional func values(forAttributes attributes: [URLResourceKey], forItemWith itemURL: URL) async throws -> [URLResourceKey : Any]
```

## 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: optional func values(forAttributes attributes: [URLResourceKey], forItemWith itemURL: URL) async throws -> [URLResourceKey : Any] For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.
