AudioAccessoryKit
Support audio features like automatic audio switching.
Overview
AudioAccessoryKit makes it possible for third-party audio accessory manufacturers to provide headphone information to the system to support automatic audio switching. For example, when someone takes off their earbuds, their iPhone can route audio to its speakers. The accessory’s companion app updates the earbuds’ placement from AccessoryControlDevice.Placement.inEar to AccessoryControlDevice.Placement.offHead. iOS reroutes the audio intelligently, rather than continuing to play audio on the distant accessory.
Your companion app pairs the accessory using AccessorySetupKit, then uses AudioAccessoryKit to register the accessory’s capabilities, such as placement. In addition to placement information, your accessory communicates connected audio sources. To participate in automatic audio switching, keep the system up-to-date about your accessory’s state changes.
Topics
Essentials
Audio configuration
Device characteristics
AccessoryControlDevice.PlacementAccessoryControlDevice.CapabilitiesAccessoryControlDevice.Configuration