---
title: "detectedValues(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipasteboard/detectedvalues(for:)"
---

# detectedValues(for:)

Requests that the data detection system asynchronously identify the types of values that you specify for the pasteboard, and return the values that it matches.

## Declaration

```swift
func detectedValues(for keyPaths: Set<PartialKeyPath<UIPasteboard.DetectedValues>>) async throws -> UIPasteboard.DetectedValues
```

## Parameters

- `keyPaths`: A set of key paths you use to indicate which types of values you want the data detection system to match.

## Return Value

Return Value An object that contains the values the data detection system matches in the pasteboard.

## Discussion

Discussion Because this method gives the app access to the values it detects in the pasteboard, the system notifies the user about reading the contents of the pasteboard.

## See Also

### Detecting patterns of content in pasteboard items

- [detectPatterns(for:completionHandler:)](uikit/uipasteboard/detectpatterns(for:completionhandler:)-23vwn.md)
- [detectedPatterns(for:)](uikit/uipasteboard/detectedpatterns(for:).md)
- [detectPatterns(for:inItemSet:completionHandler:)](uikit/uipasteboard/detectpatterns(for:initemset:completionhandler:)-7ubl1.md)
- [detectedPatterns(for:inItemSet:)](uikit/uipasteboard/detectedpatterns(for:initemset:).md)
- [detectValues(for:completionHandler:)](uikit/uipasteboard/detectvalues(for:completionhandler:)-6adre.md)
- [detectValues(for:inItemSet:completionHandler:)](uikit/uipasteboard/detectvalues(for:initemset:completionhandler:)-pm9l.md)
- [detectedValues(for:inItemSet:)](uikit/uipasteboard/detectedvalues(for:initemset:).md)
- [UIPasteboard.DetectedValues](uikit/uipasteboard/detectedvalues.md)
- [UIPasteboard.DetectionPattern](uikit/uipasteboard/detectionpattern.md)
