One Logo Pool Ball
VisionKit · IOS API REFERENCE

DataScannerViewController.RecognizedDataType

struct · iOS 16.0+ · SDK 27.1

struct RecognizedDataType

A type of data that the scanner recognizes.

Members (2)

static · iOS 16.0+

text

TypeScript
static text(languages?: Array<string>, textContentType?: (DataScannerViewController_TextContentType) | null): Promise<DataScannerViewController_RecognizedDataType>
Swift declaration
static func text(languages: [String] = [], textContentType: DataScannerViewController.TextContentType? = nil) -> DataScannerViewController.RecognizedDataType

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

static · iOS 16.0+

barcode

TypeScript
static barcode(symbologies?: Array<_Vision_VNBarcodeSymbology>): Promise<DataScannerViewController_RecognizedDataType>
Swift declaration
static func barcode(symbologies: [VNBarcodeSymbology] = []) -> DataScannerViewController.RecognizedDataType

Creates a data type for barcodes the use the specified symbologies. - Parameter symbologies: The barcode symbologies that the scanner recognizes. - Returns: A barcode data type for the specified symbologies.

Skipped declarations

No declarations were skipped in this snapshot.

All VisionKit types →