<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPasteboard/detectedValues(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:So12UIPasteboardC5UIKitE14detectedValues3forAbCE08DetectedD0VShys14PartialKeyPathCyAGGG_tYaKF"
  },
  "title" : "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.

```
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

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

## 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.

---

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)