DataDetection identifies and extracts common data types from text, including links, phone numbers, email addresses, and dates. You scan text with DataDetector and receive results as DDMatch objects, each specialized by the kind of data found: DDMatchLink, DDMatchPhoneNumber, DDMatchEmailAddress, DDMatchPostalAddress, DDMatchCalendarEvent, DDMatchShipmentTrackingNumber, DDMatchFlightNumber, and DDMatchMoneyAmount. Use these matches to recognize structured content in user-provided or displayed text across iOS, macOS, tvOS, watchOS, and visionOS.
Essentials 2
Scan text to detect common structured data types and obtain the resulting matches.
- EnDataDetectoriOS 26.0+A type that scans text and detects common data types such as links, phone numbers, addresses, and dates.
- ClDDMatchiOS 15.0+A base class for common types of data that the data detection system
Communication Matches 3
Matches that represent ways to reach someone, such as links, phone numbers, and email addresses.
- ClDDMatchLinkiOS 15.0+An object that contains a web link that the data detection system matches.
- ClDDMatchPhoneNumberiOS 15.0+An object that contains a phone number that the data detection system
- ClDDMatchEmailAddressiOS 15.0+An object that contains an email address that the data detection system
Location and Calendar Matches 2
Matches that represent postal addresses and calendar events found in text.
- ClDDMatchPostalAddressiOS 15.0+An object that contains a postal address that the data detection system
- ClDDMatchCalendarEventiOS 15.0+An object that represents a calendar date or date range that the data
Travel and Commerce Matches 3
Matches that represent shipment tracking numbers, flight numbers, and monetary amounts.
- ClDDMatchShipmentTrackingNumberiOS 15.0+An object that contains parcel tracking information that the data detection
- ClDDMatchFlightNumberiOS 15.0+An object that contains a flight number that the data detection system
- ClDDMatchMoneyAmountiOS 15.0+An object that contains an amount of money that the data detection system