Contents

updateAccessories(_:)

Updates the accessories being tracked by a provider.

Declaration

final func updateAccessories(_ accessories: [Accessory]) async throws

Parameters

  • accessories:

    The new set of accessories to track.

Discussion

Updates are atomic: if any accessory fails to be added, the entire request fails and the provider continues tracking the original set of accessories.

Update requests are processed sequentially. If multiple requests are made while an update is in progress, only the most recent request is retained and will be processed next; intermediate requests are superseded and throw an error.