iOS17 UITextView inputView becomFirstResponder does not work

Simplely, when we set UITextView.inputView and then call becomeFirstResponder, but the custom inputView could not show expectedly just like before. We test this code in iOS17 and below, while only iOS17 does not work.

And xcode console print these logs:

Failed to retrieve snapshot. -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID Unsupported action selector setShiftStatesNeededInDestination:autoShifted:shiftLocked: Unsupported action selector setShiftStatesNeededInDestination:autoShifted:shiftLocked: Unsupported action selector setShiftStatesNeededInDestination:autoShifted:shiftLocked: Unsupported action selector setShiftStatesNeededInDestination:autoShifted:shiftLocked:

Hey Guys,

POTENTIAL WORK AROUND FOR THOSE TESTING ON PHONE:

Chiming in from left field after getting this error: -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. inputModality = Keyboard, inputOperation = <null selector>, customInfoType = UIEmojiSearchOperations.

If you are just simply trying to run your app on a physical device, push the updated code to your phone (hitting the play button in Xcode). You will automatically enter the app on your device however, close out of the app entirely (swiping up on the app so it's basically not running in parallel with what you see in Xcode). Then re-enter the app (you won't get debugging features) and the app should work fine. Again, if you are simply trying to test on physical device, that is what worked for me. Let me know if it helps.

Ten months in on this thread and 24k people watching. Anyone have a solution to this yet? It's really hard to debug when our tools are broken and Apple doesn't visit the developer forums anymore.

iOS17 UITextView inputView becomFirstResponder does not work
 
 
Q