What problem does it solve?
AccessorySetupKit removes the friction and overreach of broad Bluetooth/Wi‑Fi permission prompts by providing a privacy-preserving, per-accessory authorization flow for discovering and setting up nearby devices.
Core Features & Use Cases
- Privacy-preserving accessory discovery: Use
ASAccessorySession to present a system-managed picker so users grant access per accessory.
- Descriptor-based targeting: Define
ASDiscoveryDescriptor rules for BLE devices (service UUIDs, company identifiers, name substrings, and advertisement data matching) and for Wi‑Fi devices (SSID or SSID prefix).
- Lifecycle event coordination: Handle
ASAccessoryEvent callbacks for activation, accessory added/changed/removed, picker presentation/dismissal, migration, and setup/authorization progress.
- Migration from CoreBluetooth: Use
ASMigrationDisplayItem to transition existing, already-authorized accessories into the new authorization model without breaking discovery flow.
Quick Start
Configure your app’s Info.plist for NSAccessorySetupSupports (Bluetooth and/or WiFi) and then activate an ASAccessorySession to show a picker created from ASPickerDisplayItem instances that include a correctly matched ASDiscoveryDescriptor.