rensbreur / SwiftTUI

SwiftUI for terminal applications
MIT License
1.23k stars 48 forks source link

Fatal error: Range requires lowerBound <= upperBound in Example #43

Open iDevPro opened 1 month ago

iDevPro commented 1 month ago
  1. Create console app in Xcode
  2. Add dependency (SwiftTUI)
  3. Write code in main.swift
    
    import SwiftTUI

struct MyTerminalView: View { var body: some View { Text("Hello, world!") } }

Application(rootView: MyTerminalView()).start()


4. Build and run with Xcode
=========
Result:
<img width="1129" alt="Снимок экрана 2024-10-29 в 08 45 30" src="https://github.com/user-attachments/assets/f9839b1e-98df-46d6-a4e9-669b672c9012">

<img width="769" alt="Снимок экрана 2024-10-29 в 08 47 16" src="https://github.com/user-attachments/assets/381dddac-f217-4c01-868f-76f6f9c04d77">
=========

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