@available(iOS 14.0, macOS 11, tvOS 14.0, *)
public final class HostedWorkflowItem<Content> : UIHostingController<Content>, FlowRepresentable where Content : FlowRepresentable, Content : View

A wrapper around UIHostingController that is FlowRepresentable.


HostedWorkflowItem is designed to be used in UIKit workflows that want to interoperate with SwiftUI. You do not need to inherit from this class, nor do you need to reference it outside of your workflow creation.


struct SwiftUIView: View, FlowRepresentable {
    weak var _workflowPointer: AnyFlowRepresentable?

    var body: some View {
        Text("My View")

// from the UIViewController launching the Workflow:
        .thenProceed(with: HostedWorkflowItem<SwiftUIView>.self))