iOS 16 simulator keyboardWillShowNotification firing every keystroke

Just downloaded and installed the latest Xcode and simulator (Version 14.0 (14A309)). I have an in progress app that listens to keyboardWillShowNotification to move the screen up.

As of iOS 16, keyboardWillShowNotification keeps firing every (or every few) key strokes. The additional events seem to all come in with animation duration of 0. Seems like a huge bug, maybe i'm missing something

First correct event:

keyboard will show: NSConcreteNotification 0x600002d67f20 {name = UIKeyboardWillShowNotification; userInfo = {
  UIKeyboardAnimationCurveUserInfoKey = 7;
  UIKeyboardAnimationDurationUserInfoKey = "0.25";
  UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {393, 119}}";
  UIKeyboardCenterBeginUserInfoKey = "NSPoint: {196.5, 911.5}";
  UIKeyboardCenterEndUserInfoKey = "NSPoint: {196.5, 867.5}";
  UIKeyboardFrameBeginUserInfoKey = "NSRect: {{0, 852}, {393, 119}}";
  UIKeyboardFrameEndUserInfoKey = "NSRect: {{0, 808}, {393, 119}}";
  UIKeyboardIsLocalUserInfoKey = 1;
}}

Second event after typing a few characters:

keyboard will show: NSConcreteNotification 0x600002d1c8e0 {name = UIKeyboardWillShowNotification; userInfo = {
  UIKeyboardAnimationCurveUserInfoKey = 7;
  UIKeyboardAnimationDurationUserInfoKey = 0;
  UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {393, 119}}";
  UIKeyboardCenterBeginUserInfoKey = "NSPoint: {196.5, 867.5}";
  UIKeyboardCenterEndUserInfoKey = "NSPoint: {196.5, 867.5}";
  UIKeyboardFrameBeginUserInfoKey = "NSRect: {{0, 808}, {393, 119}}";
  UIKeyboardFrameEndUserInfoKey = "NSRect: {{0, 808}, {393, 119}}";
  UIKeyboardIsLocalUserInfoKey = 1;
}}

Was successfully able to return to previous experience by adding a check if duration exists and is not zero to my callback logic. Feels like that shouldn't be necessary

if let keyboardSize = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue, let duration = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? String), duration != "0" {
iOS 16 simulator keyboardWillShowNotification firing every keystroke
 
 
Q