---
title: DataDetection
framework: DataDetection
role: collection
role_heading: Framework
platforms: [iOS 15.0+, iPadOS 15.0+, Mac Catalyst 15.0+, macOS 12.0+, tvOS 15.0+, visionOS 1.0+, watchOS 8.0+]
path: datadetection
---

# DataDetection

Access and utilize common types of data that the data detection system matches.

## Overview

Overview Data detection methods in other frameworks detect common types of data represented in text, and return  DataDetection framework classes that provide semantic meaning for matches. Get relevant, domain-specific information from matches of the following types: Calendar events Email addresses Flight numbers Web links Amounts of money, with currencies Phone numbers Postal addresses Shipment tracking numbers Use functions, such as those in UIPasteboard, to detect the types of data that you specify in a particular context. For example, find email addresses in a pasteboard using detectValues(for:completionHandler:) as this example shows: UIPasteboard.general.detectValues(for: [\.emailAddresses]) { [self] result in     switch result {     case .success(let detectedValues):         guard let firstEmailAddressMatch = detectedValues.emailAddresses.first else {             return         }         let newEmailAddress = firstEmailAddressMatch.emailAddress         let newLabel = firstEmailAddressMatch.label         addNewEmail(for: contact, address: newEmailAddress, label: newLabel)     case .failure(let error):         print("Error detecting email addresses: \(error.localizedDescription)")     } } Then, inspect and use the data from objects that the data detection system returns.

## Topics

### Matched strings

- [DDMatch](datadetection/ddmatch.md)
- [DataDetector](datadetection/datadetector.md)

### Matched data types

- [DDMatchCalendarEvent](datadetection/ddmatchcalendarevent.md)
- [DDMatchEmailAddress](datadetection/ddmatchemailaddress.md)
- [DDMatchFlightNumber](datadetection/ddmatchflightnumber.md)
- [DDMatchLink](datadetection/ddmatchlink.md)
- [DDMatchMoneyAmount](datadetection/ddmatchmoneyamount.md)
- [DDMatchPhoneNumber](datadetection/ddmatchphonenumber.md)
- [DDMatchPostalAddress](datadetection/ddmatchpostaladdress.md)
- [DDMatchShipmentTrackingNumber](datadetection/ddmatchshipmenttrackingnumber.md)

### Pasteboard detectors

- [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)
- [detectedValues(for:)](uikit/uipasteboard/detectedvalues(for:).md)
- [detectValues(for:inItemSet:completionHandler:)](uikit/uipasteboard/detectvalues(for:initemset:completionhandler:)-pm9l.md)
- [detectedValues(for:inItemSet:)](uikit/uipasteboard/detectedvalues(for:initemset:).md)
