MLKitBarcodeScanning Framework Reference

  • This documentation details classes for barcode scanning functionalities within ML Kit.

  • The classes provide representations for various barcode data types like addresses, calendar events, contact information, driver's licenses, emails, geographic locations, and more.

  • MLKBarcodeScanner and MLKBarcodeScannerOptions are used for the barcode scanning process itself, while other classes represent the extracted data.

  • Developers can access both a simplified view of the barcode information and the raw barcode data using these classes.

  • These classes are part of the ML Kit Barcode Scanning API for iOS, offering tools for developers to integrate barcode scanning features into their applications.

Classes

The following classes are available globally.

  • An address.

    Declaration

    Objective-C

    
    @interface MLKBarcodeAddress : NSObject
  • A calendar event extracted from a QR code.

    Declaration

    Objective-C

    
    @interface MLKBarcodeCalendarEvent : NSObject
  • A driver’s license or ID card data representation.

    An ANSI driver’s license contains more fields than are represented by this class. The Barcode‘s rawValue property can be used to access the other fields.

    Declaration

    Objective-C

    
    @interface MLKBarcodeDriverLicense : NSObject
  • An email message from a ‘MAILTO:’ or similar QR Code type.

    Declaration

    Objective-C

    
    @interface MLKBarcodeEmail : NSObject
  • GPS coordinates from a GEO: or similar QR Code type data.

    Declaration

    Objective-C

    
    @interface MLKBarcodeGeoPoint : NSObject
  • A person’s name, both formatted as individual name components.

    Declaration

    Objective-C

    
    @interface MLKBarcodePersonName : NSObject
  • A phone number from a TEL: or similar QR Code type.

    Declaration

    Objective-C

    
    @interface MLKBarcodePhone : NSObject
  • An SMS message from an SMS: or similar QR Code type.

    Declaration

    Objective-C

    
    @interface MLKBarcodeSMS : NSObject
  • A URL and title from a ‘MEBKM:’ or similar QR Code type.

    Declaration

    Objective-C

    
    @interface MLKBarcodeURLBookmark : NSObject
  • Wi-Fi network parameters from a WIFI: or similar QR Code type.

    Declaration

    Objective-C

    
    @interface MLKBarcodeWiFi : NSObject
  • A person’s or organization’s business card. This may come from different underlying formats including VCARD and MECARD.

    This object represents a simplified view of possible business cards. If you require lossless access to the information in the barcode, you should parse the raw data yourself. To access the raw data, use the Barcode‘s rawValue property.

    Declaration

    Objective-C

    
    @interface MLKBarcodeContactInfo : NSObject
  • A barcode in an image.

    Declaration

    Objective-C

    
    @interface MLKBarcode : NSObject
  • A barcode scanner that scans barcodes in an image.

    Declaration

    Objective-C

    
    @interface MLKBarcodeScanner : NSObject
  • Options for specifying a barcode scanner.

    Declaration

    Objective-C

    
    @interface MLKBarcodeScannerOptions : NSObject