[UIKeyboardImpl] Unsupported action selector setShiftStatesNeededInDestination:autoShifted:shiftLocked:

In iOS 17 Swift, I am encountering an issue where the method textField(_:shouldChangeCharactersIn:replacementString:) is being called two times on each keyboard button press. This behavior is causing a disruption in my functionality.

Additionally, I am receiving the following warning messages in the console:

2023-06-27 13:29:09.745854+0530[79059:1391219] [UIKeyboardImpl] Unsupported action selector setShiftStatesNeededInDestination:autoShifted:shiftLocked: 2023-06-27 13:29:09.746747+0530[79059:1391219] [UIKeyboardImpl] Unsupported action selector clearKeyboardSnapshot 2023-06-27 13:29:15.773321+0530[79059:1391219] [KeyboardUIClient] Failed to retrieve snapshot. 2023-06-27 13:29:15.776752+0530[79059:1391219] [RTILog] -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID 2023-06-27 13:29:15.777341+0530[79059:1391219] [RTILog] -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID

I have similar logs on iOS 17 simulator:

[UIKeyboardImpl] Unsupported action selector setShiftStatesNeededInDestination:autoShifted:shiftLocked:
[UIKeyboardImpl] Unsupported action selector setShiftStatesNeededInDestination:autoShifted:shiftLocked:
[UIKeyboardImpl] Unsupported action selector clearKeyboardSnapshot
[UIKeyboardImpl] Unsupported action selector setShiftStatesNeededInDestination:autoShifted:shiftLocked:
[UIKeyboardImpl] Unsupported action selector setShiftStatesNeededInDestination:autoShifted:shiftLocked:

this happens when a textfield becomes first responder - and the normal keyboard replaces my custom keyboard.

It also happens when I rotate the device whilst the textfield is focused. But it does not cause any issues so far.

[UIKeyboardImpl] Unsupported action selector setShiftStatesNeededInDestination:autoShifted:shiftLocked:
 
 
Q