I am currently developing an iOS app using Swift. I want the app to list all of the paired bluetooth classic (or at least the A2DP) devices. Afterwards I want to be able to pick one and connect to it. To pair from within the app would be nice to have. - I am currently using the ExternalAccessory.framework
to achieve this.
The class EAAccessoryManager
has a method called showBluetoothAccessoryPickerWithNameFilter
. But it opens up an empty table view all the time even when I am connected to an A2DP device. Also there is a property called connectedAccessories
. The length of that array is 0
all the time no matter if an A2DP device is connected or not.
My research has shown that the devices don't have to fit the MFi program when they are using A2DP. But I think I still need a string for the key UISupportedExternalAccessoryProtocols
in the Info.plist file of the Xcode project to make the A2DP devices "visible" for the ExternalAccessory.framework
.
Is there something like a default protocol string when using A2DP? - Or is my approach completely wrong and I need to use a different library to achieve what I want?