MLKitBarcodeScanning Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
Constants
The following constants are available globally.
-
Unknown Barcode value types.
-
Barcode value type for contact info.
-
Barcode value type for email addresses.
-
Barcode value type for ISBNs.
-
Barcode value type for phone numbers.
-
Barcode value type for product codes.
-
Barcode value type for SMS details.
-
Barcode value type for plain text.
-
Barcode value type for URLs/bookmarks.
-
Barcode value type for Wi-Fi access point details.
-
Barcode value type for geographic coordinates.
-
Barcode value type for calendar events.
-
Barcode value type for driver’s license data.
-
Barcode unknown address type.
-
Barcode work address type.
-
Barcode home address type.
-
-
-
-
-
-
-
-
Barcode mobile phone type.
-
Barcode unknown Wi-Fi encryption type.
-
Barcode open Wi-Fi encryption type.
-
Barcode WPA Wi-Fi encryption type.
-
Barcode WEP Wi-Fi encryption type.
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.
[null,null,["Last updated 2024-07-10 UTC."],[[["\u003cp\u003eThis documentation details globally available constants used for barcode scanning with ML Kit on iOS.\u003c/p\u003e\n"],["\u003cp\u003eConstants define barcode value types, such as URLs, emails, contact info, and more.\u003c/p\u003e\n"],["\u003cp\u003eAdditional constants specify address types, email types, phone types, and Wi-Fi encryption types associated with barcodes.\u003c/p\u003e\n"],["\u003cp\u003eThese constants are declared in Objective-C and provide standardized values for interpreting barcode data.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use these constants to access and utilize barcode information effectively within their applications.\u003c/p\u003e\n"]]],[],null,["# MLKitBarcodeScanning Framework Reference\n\nConstants\n=========\n\nThe following constants are available globally.\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeUnknown](#/c:MLKBarcode.h@MLKBarcodeValueTypeUnknown)\n\n `\n ` \n Unknown Barcode value types. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeUnknown = 0\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeContactInfo](#/c:MLKBarcode.h@MLKBarcodeValueTypeContactInfo)\n\n `\n ` \n Barcode value type for contact info. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeContactInfo = 1\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeEmail](#/c:MLKBarcode.h@MLKBarcodeValueTypeEmail)\n\n `\n ` \n Barcode value type for email addresses. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeEmail = 2\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeISBN](#/c:MLKBarcode.h@MLKBarcodeValueTypeISBN)\n\n `\n ` \n Barcode value type for ISBNs. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeISBN = 3\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypePhone](#/c:MLKBarcode.h@MLKBarcodeValueTypePhone)\n\n `\n ` \n Barcode value type for phone numbers. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypePhone = 4\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeProduct](#/c:MLKBarcode.h@MLKBarcodeValueTypeProduct)\n\n `\n ` \n Barcode value type for product codes. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeProduct = 5\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeSMS](#/c:MLKBarcode.h@MLKBarcodeValueTypeSMS)\n\n `\n ` \n Barcode value type for SMS details. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeSMS = 6\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeText](#/c:MLKBarcode.h@MLKBarcodeValueTypeText)\n\n `\n ` \n Barcode value type for plain text. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeText = 7\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeURL](#/c:MLKBarcode.h@MLKBarcodeValueTypeURL)\n\n `\n ` \n Barcode value type for URLs/bookmarks. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeURL = 8\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeWiFi](#/c:MLKBarcode.h@MLKBarcodeValueTypeWiFi)\n\n `\n ` \n Barcode value type for Wi-Fi access point details. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeWiFi = 9\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeGeographicCoordinates](#/c:MLKBarcode.h@MLKBarcodeValueTypeGeographicCoordinates)\n\n `\n ` \n Barcode value type for geographic coordinates. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeGeographicCoordinates = 10\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeCalendarEvent](#/c:MLKBarcode.h@MLKBarcodeValueTypeCalendarEvent)\n\n `\n ` \n Barcode value type for calendar events. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeCalendarEvent = 11\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeValueTypeDriversLicense](#/c:MLKBarcode.h@MLKBarcodeValueTypeDriversLicense)\n\n `\n ` \n Barcode value type for driver's license data. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType MLKBarcodeValueTypeDriversLicense = 12\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeAddressTypeUnknown](#/c:MLKBarcode.h@MLKBarcodeAddressTypeUnknown)\n\n `\n ` \n Barcode unknown address type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeAddressType MLKBarcodeAddressTypeUnknown = 0\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeAddressTypeWork](#/c:MLKBarcode.h@MLKBarcodeAddressTypeWork)\n\n `\n ` \n Barcode work address type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeAddressType MLKBarcodeAddressTypeWork = 1\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeAddressTypeHome](#/c:MLKBarcode.h@MLKBarcodeAddressTypeHome)\n\n `\n ` \n Barcode home address type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeAddressType MLKBarcodeAddressTypeHome = 2\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeEmailTypeUnknown](#/c:MLKBarcode.h@MLKBarcodeEmailTypeUnknown)\n\n `\n ` \n Unknown email type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeEmailType MLKBarcodeEmailTypeUnknown = 0\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeEmailTypeWork](#/c:MLKBarcode.h@MLKBarcodeEmailTypeWork)\n\n `\n ` \n Barcode work email type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeEmailType MLKBarcodeEmailTypeWork = 1\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeEmailTypeHome](#/c:MLKBarcode.h@MLKBarcodeEmailTypeHome)\n\n `\n ` \n Barcode home email type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeEmailType MLKBarcodeEmailTypeHome = 2\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodePhoneTypeUnknown](#/c:MLKBarcode.h@MLKBarcodePhoneTypeUnknown)\n\n `\n ` \n Unknown phone type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodePhoneType MLKBarcodePhoneTypeUnknown = 0\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodePhoneTypeWork](#/c:MLKBarcode.h@MLKBarcodePhoneTypeWork)\n\n `\n ` \n Barcode work phone type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodePhoneType MLKBarcodePhoneTypeWork = 1\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodePhoneTypeHome](#/c:MLKBarcode.h@MLKBarcodePhoneTypeHome)\n\n `\n ` \n Barcode home phone type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodePhoneType MLKBarcodePhoneTypeHome = 2\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodePhoneTypeFax](#/c:MLKBarcode.h@MLKBarcodePhoneTypeFax)\n\n `\n ` \n Barcode fax phone type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodePhoneType MLKBarcodePhoneTypeFax = 3\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodePhoneTypeMobile](#/c:MLKBarcode.h@MLKBarcodePhoneTypeMobile)\n\n `\n ` \n Barcode mobile phone type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodePhoneType MLKBarcodePhoneTypeMobile = 4\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeWiFiEncryptionTypeUnknown](#/c:MLKBarcode.h@MLKBarcodeWiFiEncryptionTypeUnknown)\n\n `\n ` \n Barcode unknown Wi-Fi encryption type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeWiFiEncryptionType MLKBarcodeWiFiEncryptionTypeUnknown =\n 0\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeWiFiEncryptionTypeOpen](#/c:MLKBarcode.h@MLKBarcodeWiFiEncryptionTypeOpen)\n\n `\n ` \n Barcode open Wi-Fi encryption type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeWiFiEncryptionType MLKBarcodeWiFiEncryptionTypeOpen = 1\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeWiFiEncryptionTypeWPA](#/c:MLKBarcode.h@MLKBarcodeWiFiEncryptionTypeWPA)\n\n `\n ` \n Barcode WPA Wi-Fi encryption type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeWiFiEncryptionType MLKBarcodeWiFiEncryptionTypeWPA = 2\n\n- `\n ``\n ``\n `\n\n ### [MLKBarcodeWiFiEncryptionTypeWEP](#/c:MLKBarcode.h@MLKBarcodeWiFiEncryptionTypeWEP)\n\n `\n ` \n Barcode WEP Wi-Fi encryption type. \n\n #### Declaration\n\n Objective-C \n\n static const /ml-kit/reference/ios/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeWiFiEncryptionType MLKBarcodeWiFiEncryptionTypeWEP = 3"]]