Contents

current(for:)

Retrieves the accessory’s current configuration.

Declaration

static func current(for accessory: ASAccessory) throws -> AccessoryControlDevice

Parameters

  • accessory:

    The accessory for which to get the current state.

Return Value

The accessory’s current configuration.

Discussion

This method throws an error if the accessory isn’t registered, or if communication fails.