Post

Replies

Boosts

Views

Activity

Reply to AccessorySetupKit - Accessory not found on some iPhones
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.
3w
Reply to AccessorySetupKit - Accessory not found on some iPhones
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?
3w