Skip to content
TheChatArchiveThe Chat Archive
gpt-4.1-mini-2025-04-14· OpenAIAi2 WildChat-4.8M (AI2)

hello

  1. User

    User: hello Assistant: Hello! How can I assist you today? User: I want you to make a swift macos app that shows hello world Assistant:

  2. Assistant

    Sure! Here’s a simple Swift macOS app that displays "Hello World" in a window using SwiftUI.

    1. Open Xcode and create a new macOS project:
    • Select "App"
    • Make sure "Interface" is set to SwiftUI
    • Name your project (e.g., HelloWorldApp)
    • Choose Swift as the language
    1. Replace the content of your HelloWorldApp.swift (or similar) file with the following code:
    import SwiftUI
    
    @main
    struct HelloWorldApp: App {
        var body: some Scene {
            WindowGroup {
                ContentView()
            }
        }
    }
    
    struct ContentView: View {
        var body: some View {
            Text("Hello World")
                .frame(maxWidth: .infinity, maxHeight: .infinity)
                .font(.largeTitle)
                .multilineTextAlignment(.center)
        }
    }
    
    1. Run the app, and you should see a window that shows "Hello World" centered.

    Let me know if you want me to help you with an AppKit version or need further customization!