showBluetoothAccessoryPicker returns 错误 2

showBluetoothAccessoryPicker returns error 2

使用以下代码:

EAAccessoryManager.SharedAccessoryManager.ShowBluetoothAccessoryPicker(null,HandleAction1);

void HandleAction1(NSError obj)
{
   System.Diagnostics.Debug.WriteLine("HandleAction1");
}

Returns:

{The operation couldn’t be completed. (EABluetoothAccessoryPickerErrorDomain error 2.)}

您已声明要取消显示的选择器。在这种情况下,预计会收到错误 2,因为那是 EABluetoothAccessoryPickerError.Code.resultCancelled

您不会在此列表中看到标准蓝牙配件,例如免提设备或扬声器;仅显示 MFi 设备:

Note

The picker displays only Bluetooth devices that include an iAP over Bluetooth unique ID in their extended inquiry response.

这个库只适用于 MFI 设备。它不适用于大多数常见设备。它对典型设备没有用。