ASDiscoveryDescriptor
Descriptive traits used to discover accessories.
Declaration
class ASDiscoveryDescriptorMentioned in
Overview
Use an instance of this type to identify accessories your app can set up, then set it as the descriptor property of an ASPickerDisplayItem.
Some of the Bluetooth identifier properties work together to filter matching accessories, as described in the following table.
Use | Filter property | Also requires | Description |
|---|---|---|---|
Required | (none) | Provide at least one UUID or manufacturer ID to filter. | |
Optional | Provide a name substring to look for. Requires setting at least a service UUID or company ID, which identifies the service or company using the name. | ||
Optional | Bluetoothmanufacturerdatablob and Bluetoothmanufacturerdatamask | When using manufacturer data filters, provide both the data and mask. These properties should have the same length and be less than or equal to the size of the advertised payload. The Bluetoothcompanyidentifier identifies the manufacturer associated with the data. | |
Optional | When using UUID service data filters, provide both the data and mask. These properties should have the same length and be less than or equal to the size of the advertised payload. The Bluetoothserviceuuid identifies the service associated with the data. |
The descriptor also allows you to set the bluetoothRange of matched accessories; set its value to ASDiscoveryDescriptor.Range.immediate to limit discovery of Bluetooth accessories to those within the immediate proximity of the device running your app.
Topics
Specifying Bluetooth properties
bluetoothCompanyIdentifierASBluetoothCompanyIdentifierASBluetoothCompanyIdentifierbluetoothManufacturerDataBlobbluetoothManufacturerDataMaskbluetoothServiceDataBlobbluetoothServiceDataMaskbluetoothNameSubstringbluetoothNameSubstringCompareOptionsbluetoothServiceUUIDbluetoothRangeASDiscoveryDescriptor.Range