Contents

register(_:_:)

Registers the audio accessory with the system and activates its configured capabilities.

Declaration

nonisolated(nonsending) static func register(_ accessory: ASAccessory, _ configuration: AccessoryControlDevice.Configuration) async throws

Parameters

  • accessory:

    The accessory to register.

  • configuration:

    The configuration for the device.

Discussion

To activate audio features like automatic switching, call this method after pairing your accessory using AccessorySetupKit.

This method throws an error if registration fails.