AI-generated Key Takeaways
-
This documentation outlines globally available type definitions used for barcode scanning with ML Kit.
-
The types define barcode value formats (e.g., TEXT, PRODUCT, URL), address types, email types, phone types, and Wi-Fi encryption types.
-
A
MLKBarcodeScanningCallbacktype is also defined, which is a block providing the results of a barcode scan, including an array of barcodes or an error. -
All type definitions are declared using Objective-C and are represented as NSInteger enums.
Type Definitions
The following type definitions are available globally.
-
@enum BarcodeValueType Barcode’s value format. For example, TEXT, PRODUCT, URL, etc.
Declaration
Objective-C
typedef NSInteger MLKBarcodeValueType -
@enum BarcodeAddressType Address type.
Declaration
Objective-C
typedef NSInteger MLKBarcodeAddressType -
@enum BarcodeEmailType Email type for BarcodeEmail.
Declaration
Objective-C
typedef NSInteger MLKBarcodeEmailType -
@enum BarcodePhoneType Phone type for BarcodePhone.
Declaration
Objective-C
typedef NSInteger MLKBarcodePhoneType -
@enum BarcodeWiFiEncryptionType Wi-Fi encryption type for BarcodeWiFi.
Declaration
Objective-C
typedef NSInteger MLKBarcodeWiFiEncryptionType -
A block containing an array of barcodes or
nilif there’s an error.Declaration
Objective-C
typedef void (^MLKBarcodeScanningCallback)(NSArray<MLKBarcode *> *_Nullable, NSError *_Nullable)Parameters
barcodesArray of barcodes scanned in the image or
nilif there was an error.errorThe error or
nil.