MLKitBarcodeScanning Framework Reference

  • MLKBarcodeDriverLicense is an Objective-C class that represents data extracted from a driver's license or ID card.

  • It provides readonly access to various fields like name, address, birth date, license number, and expiry date.

  • The rawValue property of the associated Barcode object can be used to access additional fields not directly exposed by this class.

  • Date formats for birth date, expiry date, and issuing date depend on the issuing country.

  • The documentType property indicates whether the scanned document is a driver's license (DL) or an ID card (ID).

MLKBarcodeDriverLicense


@interface MLKBarcodeDriverLicense : 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.

  • Holder’s first name.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *firstName;
  • Holder’s middle name.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *middleName;
  • Holder’s last name.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *lastName;
  • Holder’s gender. 1 is male and 2 is female.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *gender;
  • City of the holder’s address.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *addressCity;
  • State of the holder’s address.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *addressState;
  • Street of the holder’s address.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *addressStreet;
  • Zipcode of the holder’s address.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *addressZip;
  • Holder’s birthday. The date format depends on the issuing country.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *birthDate;
  • DL for driver’s licenses, ID for ID cards.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *documentType;
  • Driver’s license ID number.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *licenseNumber;
  • Driver’s license expiration date. The date format depends on the issuing country.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *expiryDate;
  • The date format depends on the issuing country.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *issuingDate;
  • The country in which the DL/ID was issued.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *issuingCountry;
  • Unavailable.

    Declaration

    Objective-C

    - (nonnull instancetype)init;