MLKitBarcodeScanning 框架参考
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\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"]]