0

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

bhumi
  • 57
  • 1
  • 8
  • Try searching for `ios detect external keyboard` ... plenty of results to look through to find a suitable approach. Here is one result to start with: https://stackoverflow.com/questions/31991873/how-to-reliably-detect-if-an-external-keyboard-is-connected-on-ios-9 – DonMag Jul 22 '21 at 12:24
  • Thanks, but i don't want notification in App, I want to detect in keyboard extension which is UIInputViewController class – bhumi Jul 22 '21 at 12:34

0 Answers0