Instance Property

properties

An array of properties that describe the characteristic.

Declaration

var properties: [String] { get }

Discussion

Test a characteristic’s properties array for any of the constants listed in Characteristic Properties to learn something about the corresponding characteristic. For example, you can create a readability Boolean in an extension to the HMCharacteristic class by testing for HMCharacteristicPropertyReadable:

extension HMCharacteristic {
    var isReadable: Bool {
        return properties.contains(HMCharacteristicPropertyReadable)
    }
}

See Also

Reading Characteristic Properties

Characteristic Properties

The properties that characteristics can have.