Dictation not working in custom TextView since iOS 16

Hello! I am a 3rd party developer.

In our product, we inherit UITextView, add some custom features, and apply that custom TextView to the our app.

And we provides users a dictation function. But because we are using custom textview, we provides users with a dictation function using below API.

  • (void)replaceRange:(UITextRange *)range withText:(NSString *)text;

However, starting from iOS16, the this API is not called. (Up until iOS 15, the this API was called without problem.)

So while looking for an alternative

  • (void)insertDictationResult:(NSArray<UIDictationPhrase *> *)dictationResult;

found and applied.

But the problem is that insertDictationResult is not typed in real time and is called when you exit dictation mode by selecting the microphone button on the keyboard.

We ask if there is a way to apply the dictation function in real time in a Custom UITextView. If you know the solution, please help me out.

Dictation not working in custom TextView since iOS 16
 
 
Q