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

# setTagData(_:forItemWith:completion:)

## Declaration

```swift
func setTagData(_ tagData: Data?, forItemWith itemURL: URL, completion: @escaping @Sendable (any Error) -> Void)
```

```swift
func setTagData(_ tagData: Data?, 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 setTagData(_ tagData: Data?, forItemWith itemURL: URL) async -> Error For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.
