TechnologiesMachine Learning & AI

DataDetection

iOSmacOStvOSwatchOSvisionOS

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.

  • En
    DataDetectoriOS 26.0+
    A type that scans text and detects common data types such as links, phone numbers, addresses, and dates.
  • Cl
    DDMatchiOS 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.

  • Cl
    DDMatchLinkiOS 15.0+
    An object that contains a web link that the data detection system matches.
  • Cl
    DDMatchPhoneNumberiOS 15.0+
    An object that contains a phone number that the data detection system
  • Cl
    DDMatchEmailAddressiOS 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.

  • Cl
    DDMatchPostalAddressiOS 15.0+
    An object that contains a postal address that the data detection system
  • Cl
    DDMatchCalendarEventiOS 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.

  • Cl
    DDMatchShipmentTrackingNumberiOS 15.0+
    An object that contains parcel tracking information that the data detection
  • Cl
    DDMatchFlightNumberiOS 15.0+
    An object that contains a flight number that the data detection system
  • Cl
    DDMatchMoneyAmountiOS 15.0+
    An object that contains an amount of money that the data detection system

Extends 1

StringProtocol
← Machine Learning & AI