Thursday, October 29, 2026
HomeiOS Developmentios - Detecting keyboard by way of GCKeyboard.coalesced at launch

ios – Detecting keyboard by way of GCKeyboard.coalesced at launch

[ad_1]

At software launch, I ship system configuration particulars to our server so we all know what sorts of units and settings (system OS, rotation, darkish mode, dynamic sort setting…) customers have. I am attempting to gather knowledge on {hardware} keyboard use. Broadly talking that is simple, by taking a look at GCKeyboard.coalesced.

I am discovering that if I examine that property at launch (software:didFinishLaunching), it all the time returns nil, even when a keyboard is connected. Even when I examine by way of an extended delay (dispatch_after 15 seconds), it’s all the time nil.

In some unspecified time in the future later, after some unknown interval or exercise, issues work as anticipated. For instance, if I examine it after hiding then resuming the app (resembling in software:willEnterForeground) the worth normally returns non-nil.

Any thought why this delay happens, and in that case, pressure or catch a dependable response?

I do know I can arrange a GCKeyboard notification. I at the moment report all system configuration directly, quickly after launch. I would like to incorporate the absence or presence of a {hardware} keyboard in that very same name, fairly than some subsequent name if a {hardware} keyboard is discovered.

For what it is price, I am testing this on a 2nd Gen iPad Professional with Apple’s Magic Keyboard.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments