AccessorySetupKit - Accessory not found on some iPhones

Hi there,

we're developing a Bluetooth LE device and are using the AccessorySetupKit to connect the device to our iOS application. We are a registered member of the Bluetooth SIG and are advertising our company id over BLE. Setting up the device works on most iPhones we've tested with, but not all. Here's an example of some of the devices we've tested:

  • iPhone 12 mini: Not working, tried both iOS 18.1.1 and 18.1.1
  • iPhone 13 mini: Working, iOS 18.1.1
  • iPhone 15: Not working, iOS 18.1.1
  • iPhone 15: Works now, didn't work a few weeks ago
  • iPhone 15 Pro: Works
  • iPhone 16 Pro: Works

Looking through the logs of the iPhone 12 mini while scanning I see some things that might be related in the logs (I've removed potentially identifying data). It seems to me that it's detecting the device, but not showing it in the UI:

error	11:43:54.792877+0100	bluetoothd	canSessionScanForMFGRData <our company ID> <private> there:1
default	11:43:54.795685+0100	deviceaccessd	### appBundleHasASKEnabled <our app bundle> supports Bluetooth
default	11:43:54.795730+0100	deviceaccessd	### _reportDiscoveredBTDevice DADevice: ID <removed ID>, name '<ASPickerDisplayItem.name>', btID <removed ID>, flags AccessorySetup, type Hi-Fi Speaker <CBPeripheral: 0x4b8164540, identifier = <removed ID>, name = (null), mtu = 23, state = disconnected> has no bluetooth name

We get no callbacks while the picker UI is displayed. Opening the picker on another device at the same time immediately shows our accessory.

This seems like a bug in the AccessorySetupKit too me, but I'm not sure. Could we be doing something wrong?

Just adding some more details here, we're creating our ASPickerDisplayitem like this:

private var pickerDisplayItem: ASPickerDisplayItem {
        guard let productImage = UIImage(named: "DeviceImage") else {
            fatalError("Could not load product image.")
        }

        let descriptor = ASDiscoveryDescriptor()
        descriptor.bluetoothCompanyIdentifier = .init(BluetoothConstants.companyUUID)

        let displayItem = ASPickerDisplayItem(
            name: "<device name>",
            productImage: productImage,
            descriptor: descriptor
        )

        return displayItem
    }

and we're showing the picker like this:

    func showPicker() {
        session.showPicker(for: [pickerDisplayItem]) { error in
            if let error {
                Logger.hardware.error("\(error)")
            }
        }
    }

The devices we're using are mostly the personal devices of our team members, but some of them are our older devices wiped and set up as test devices.

There are no error messages in our application logs when the issue occurs. We tried the iPhone 15 that worked earlier today again and it's now back to not working. This leads me to believe it's unlikely to be an issue with our code, given that it randomly works.

The device logs contain a lot of details I'm not comfortable sharing in a public forum, but the gist is that from my understanding the phone sees the device for some reason, but doesn't display it?

Our engineering teams need to investigate this issue, as this might indicate an issue with Accessory Setup Kit

We'd greatly appreciate it if you could file a bug report, include crash logs and sample code or models that reproduce the issue, and post the FB number here once you do.

Bug Reporting: How and Why? has tips on creating a successful bug report.

It would be very helpful if you could please go to https://developer.apple.com/bug-reporting/profiles-and-logs/ and follow the instructions for Accessory Setup Kit for iOS to install a logging profile on your device. Then reproduce the issue, and follow the instructions at the above link to create a sysdiagnose. And attach that to the Feedback report as well.


Argun Tekant /  DTS Engineer / Core Technologies

I've done my best to submit a bug report, which as much detail as I can possibly include: FB16077580

Hi again, after some more testing I've narrowed it down to this: The device must advertise a name over BLE in order to be connectable. Once I added a name to the advertisement data it immediately shows up on all devices.

It seems like the only reason it worked on a few of our iPhones it that they'd been connected to the specific device before we started using AccessorySetupKit. We also advertised a name of BLE before switching to only manufacturer specific data, so I'm guessing the phone remembered that name. I've confirmed this by testing a device that had only been connected to one of our devices and it was only able to find that specific device even though they all advertised the same data.

This requirement does not seem to be documented anywhere that I can find, so I don't know if it's indented behavior or not, but at least I can work around it for now by advertising a device name.

AccessorySetupKit - Accessory not found on some iPhones
 
 
Q