MLKitBarcodeScanning Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
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 nil
if there’s an error.
Declaration
Objective-C
typedef void (^MLKBarcodeScanningCallback)(NSArray<MLKBarcode *> *_Nullable,
NSError *_Nullable)
Parameters
barcodes
|
Array of barcodes scanned in the image or nil if there was an error.
|
error
|
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["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 `MLKBarcodeScanningCallback` type 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."]]],["The provided content defines several global type definitions in Objective-C for barcode handling. These include: `MLKBarcodeValueType` (barcode value format), `MLKBarcodeAddressType` (address type), `MLKBarcodeEmailType` (email type), `MLKBarcodePhoneType` (phone type), and `MLKBarcodeWiFiEncryptionType` (Wi-Fi encryption type). Additionally, it defines `MLKBarcodeScanningCallback`, a block that receives an array of scanned barcodes or an error if the scan fails. The callback parameters include an array of barcodes, and an error object.\n"]]