text
TypeScriptstatic text(languages?: Array<string>, textContentType?: (DataScannerViewController_TextContentType) | null): Promise<DataScannerViewController_RecognizedDataType>Swift declarationstatic func text(languages: [String] = [], textContentType: DataScannerViewController.TextContentType? = nil) -> DataScannerViewController.RecognizedDataTypeCreates a data type for text and information the scanner finds in text. Use this method to create a custom text data type. For example, if you know the content contains languages other than a person’s preferred languages, pass identifiers for those languages as the `languages` parameter. If you only want to scan for telephone numbers, pass ``DataScannerViewController/TextContentType/telephoneNumber`` as the `textContentType` parameter. To get the data scanner supported languages, use the ``DataScannerViewController/supportedTextRecognitionLanguages`` property. - Parameter languages: The identifiers for the languages that you want prioritized in the order of language processing. To specify a person’s preferred languages, pass an empty set. This parameter gives the scanner a hint on which language processing models to use. The scanner still recognizes all supported languages. - Parameter textContentType: The specific type of semantic text to find. To identify all content types, pass `nil`. - Returns: A text data type.