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:

Post not yet marked as solved Up vote post of MatchBoxy Down vote post of MatchBoxy
26k views
  • UIView *cv = [[UIView alloc] initWithFrame:CGRectMake(0, 0, _customKBView.frame.size.width, _customKBView.frame.size.height)]; cv.backgroundColor = [UIColor blueColor]; [cv addSubview:_customKBView];

    _fakeTxtView.inputView = cv; [_fakeTxtView becomeFirstResponder];

Add a Comment

Replies

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.

  • After updating to Xcode 15.4, it solved 2 out of 3 text fields, but yeah, not fully fixed.

Add a Comment