Contents

HomeAccessorySettingsContext

A type that holds the resources that your settings provider needs to communicate with an accessory.

Declaration

protocol HomeAccessorySettingsContext

Overview

For example, a context might hold a web service client, a Matter handle, or cached identifiers. The framework passes it to your provider on every call:

struct ThermostatContext: HomeAccessorySettingsContext {
    let webService: ThermostatWebService
}

If your provider doesn’t need a context, declare an empty type like the following:

struct NoContext: HomeAccessorySettingsContext { }

See Also

Displaying accessory configuration