Search code examples
iosswiftobjective-cuikit

Get height of the safe area bottom inset from a keyboard extension


From a keyboard extension, we are trying to obtain the height of the space below the keyboard, when there is a home indicator. All the usual techniques are either inaccessible from the keyboard extension, or return 0.

From the UIInputViewController, view.safeAreaInsets.bottom returns 0, as well as parent!.view.safeAreaInsets.bottom

And any method calling windows, UIApplication, etc. is not accessible from the extension.


Solution

  • Apple has confirmed that it is currently not possible to know the safe area insets from a keyboard extension.