Hosting app not receiving UIKeyboardDidChangeFrameNotification when keyboard frame changes

Hello, I am iOS developer who is developing a custom keyboard. Our team have been having trouble with the UIKeyboardDidChangeFrameNotification. I am looking for some help.

My keyboard extension has a function that increases the keyboard height when enabled. However, the host can not always get the UIKeyboardDidChangeFrameNotification on such changes, causing layout problems in the hosting app.

And here is my setup: Xcode 12.5, iOS 14.7.1 on iPhone 12 Pro Max. I debugged with a UITextField in a dummy application.

One way to reproduce this issue is like this:

  • Launch my keyboard in the hosting app (UIKeyboardDidChangeFrameNotification is received as expected)
  • Toggle keyboard height change (UIKeyboardDidChangeFrameNotification is NOT received sometimes)
  • Return to home. Open the hosting app, where my keyboard has resumed its normal height. (UIKeyboardDidChangeFrameNotification is NOT received sometimes)

If anyone has met the same issue, please leave a comment below :). Thanks a lot.

Hosting app not receiving UIKeyboardDidChangeFrameNotification when keyboard frame changes
 
 
Q