Title: AccessorySetupKit picker only reports 3 accessories when using filterDiscoveryResults
Tags: AccessorySetupKit, Core Bluetooth
Hi all,
We recently migrated our BLE accessory pairing from our own CoreBluetooth scan flow to AccessorySetupKit. Since this is the new framework Apple recommends for accessory pairing (and with the new Bluetooth privacy model), we wanted to move fully to it. The migration went well overall, but we hit a limit in production that we couldnt find documented anywhere and it's now affecting real users.
We use .filterDiscoveryResults so we can set our own name and image for each accessory in the picker. For every .accessoryDiscovered event we create an ASDiscoveredDisplayItem and pass the full list to updatePicker(showing:completionHandler:).
let descriptor = ASDiscoveryDescriptor()
descriptor.bluetoothCompanyIdentifier = ASBluetoothCompanyIdentifier(rawValue: [ID])
descriptor.supportedOptions = .bluetoothPairingLE
let item = ASPickerDisplayItem(name: "[Name]", productImage: image, descriptor: descriptor)
let settings = ASPickerDisplaySettings()
settings.options = .filterDiscoveryResults
settings.discoveryTimeout = .long
session.pickerDisplaySettings = settings
session.showPicker(for: [item]) { _ in }
// In the event handler, for every .accessoryDiscovered event:
session.updatePicker(showing: allDiscoveredItems) { _ in }
We only ever get 3 .accessoryDiscovered events in one picker session, doesnt matter how many of our accessories are advertising nearby. Since the picker shows only what we pass to updatePicker, the sheet never shows more then 3. Our own code has no limit, every discovered item goes to updatePicker.
If we remove .filterDiscoveryResults and keep everything else same, the picker shows more than 3 accessories in the same room. So it looks like the limit only applies when filtering is on.
When there are lot of accessories around (offices, events, households with more than one), the one the user actually want to pair is often not in those 3. Users don't know there is a limit, so they keep dismissing the picker and opening it again hoping their accessory shows up this time. Understandably this is very frustrating for them, and with our old scan flow this wasn't a issue because we could list every accessory nearby.
Turn on more than 3 accessories matching the descriptor within few metres of the iPhone, present the picker with the above configuration and log every .accessoryDiscovered event. Only 3 arrive, any accessory turned on after the first 3 never shows up.
- Is this limit of 3 intended?
- If yes, is there a way to raise it or reset it during the session (for example after calling
updatePicker)? - How the picker decides which accessories gets reported?
- Is there a recommended approach for crowded environments?
- If it's intended, can it be added to the documentation?
iOS Version 27.1 (27A9269), iPhone 16 pro(MYNR3HN/A), Version 27.1 (27A9269)
We have filed this as FB25362032.
Thanks!