- Create console app in Xcode
- Add dependency (SwiftTUI)
- Write code in main.swift
import SwiftTUI
struct MyTerminalView: View {
var body: some View {
Text("Hello, world!")
}
}
Application(rootView: MyTerminalView()).start()
- Build and run with Xcode
=========
Result:

=========
P.s.: Work when run by hands in terminal :)