EAExternalAccessory Bluetooth Accessory Picker doesn't display on screen

672 views Asked by At

I've been trying to use the following method on Swift 5 to display the Bluetooth Accessory Picker:

DispatchQueue.main.async {
    EAAccessoryManager.shared().showBluetoothAccessoryPicker(withNameFilter: nameFilter, completion: nil)
}

But I get the following error:

A constraint factory method was passed a nil layout anchor.  This is not allowed, and may cause confusing exceptions. Break on BOOL _NSLayoutConstraintToNilAnchor(void) to debug.  This will be logged only once.  This may break in the future.

I've tried adding a Symbolic breakpoint, but it doesn't trigger. I've also tried calling this method from other parts of the code with different views, but still no success.

I'd really appreciate some help with this issue!

1

There are 1 answers

0
DrMickeyLauer On

It broke when Apple introduced the new Scene-based lifecycle. Roll back to the classic one and it starts working again. More details here: https://stackoverflow.com/a/70823487/415982