gpt-4.1-mini-2025-04-14· OpenAI
WildChat-4.8M (AI2)
hello
- 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:
- Assistant
Sure! Here’s a simple Swift macOS app that displays "Hello World" in a window using SwiftUI.
- 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
- 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) } }- 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!