I have a Bluetooth device enrolled in the MFi program. I am able to pair the device via Bluetooth in the iPhone settings, and then use Apple's EADemo example code to access the device via the ExternalAccessory
framework.
However, I'm wondering if it's possible to first silently pair in the background via CoreBluetooth
, and then use the ExternalAcessory
framework to communicate with the device?
I've run some experiements and after pairing with CoreBluetooth
, the ExternalAcessory
framework shows no connected devices. This might be as CoreBluetooth opperates over Bluetooth Low Energy, and ExternalAccessory
perhaps opperates over Bluetooth Classic.
Despite of this, it would be a much better user experience to pair the device from within an app, rather than needing to leave the app to access the settings. If anyone has been in this situation, or has any ideas, please feel free to share any suggestions.
CoreBluetooth
won't mean your device shows in theExternalAcessory
framework. I suspect you could theoretically connect usingCoreBluetooth
, and trigger the device to try connecting via Bluetooth Regular so it appears in theExternalAcessory
framework, however if it hasn't paired for the first time, you still need to pair it manually via the iOS Bluetooth settings. To do anything with theExternalAccessory
framework, your hardware must be enrolled in the MFi program. Hope that helps – Canaan