Why is there no UIHostingView?

In AppKit, there is NSHostingController and NSHostingView. In UIKit, there is only UIHostingController. So what gives?

Sure, you can use UIHostingController, grab its view, and ignore the controller (ie not bother adding it as a child view controller). But it seems reasonable to assume that the omission of UIHostingView is intentional and you need the view controller properly connected to make things work right. But which things?

The problem is that incorporating UIHostingController into a view controller hierarchy can be difficult because you might not know at that point it the code what the parent view controller is (unless you add some otherwise unnecessary contortions). And yet the docs say you're supposed to add the child view controller to its parent before you add the view to the superview.

For example, you could have a situation where your UIView is sandwiched in the hierarchy in between SwiftUI components - both embedding and embedded in SwiftUI. In my experiments this works fine in may ways, but UIViewRepresentable doesn't give you a view controller to be the parent of your UIHostingController. So you're stuck with the consequences of an orphan view controller... whatever they are.

I've wondered about this omission also.

There is, only it is not a public API. _UIHostingView The underscore prefix means it is not public API. But it works if you try it out. However, I would not recommend using it, because there is a reason it is not public, and you will possibly bury mines in your code if you use it.

Any updates on this or Radars that have been filed for this enhancement? I'm starting to see pieces of code where people simply instantiate a UIHostingController, grab the view from it and put it in their view hierarchy without properly adding the hosting controller instance as a child view controller of a parent view controller and such.

I'm working on internal UI Framework and we'd like to provide some pre-built chart component (via the SwiftChart framework) views for our company developers to use. It would be great if say _UIHostingView was public to allow us to do that.

I'm getting feedback that our internal developers want a UIView instance to make integration into their UI's easier, which I understand their feedback, and is a perfectly reasonable expectation.

Why is there no UIHostingView?
 
 
Q