I have an app with a custom keyboard extension, I want to show a prediction view whenever Hardware (Bluetooth) keyboard is connected.
Grammarly has done this thing, but I do not find any way to detect hardware keyboard connections in my keyboard class.
Update : You can get a connection via
let isKeyboardConnected = GCKeyboard.coalesced != nil
but you need to check for this method continuously