TextEditor on iOS not showing keyboard when component is attached to a UIView

I have an issue with app whose MainComponent that has been attached to a UIView via addToDesktop. One of the sub-components has a TextEditor, which does not launch a keyboard since the change. I’ve confirmed by testing a different JUCE iOS app which loads in a similar way, and a TextEditor there also does not show the keyboard on tap.

I know this is not the usual use context for a JUCE iOS app, but before I go digging I wanted to get some feedback from the JUCE team.

My current thought is that I should wrap a UITextField in a Pimpl class and use that in place of the JUCE TextEditor.

So I can see that the TextEditor::mouseDown is triggered, and handleTouch also. However it seems that findCurrentTextInputTarget always returns nullptr.

So - I implemented a temporary fix (this is an interim version of this app) by making the ViewController that handles the Juce controlled view have canBecomeFirstResponder return YES, and then on viewDidAppear resignFirstResponder after which, when the particular Component that needs the keyboard comes up, call assignFirstResponder.

Then I had to trickle the keyboard events down into the relevant component’s TextEditor… feels like a bit of a hack but it works.