Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Minimal Swift 4.2 GUI Application without Xcode
import AppKit
let app = NSApplication.shared
let window = NSWindow(
contentRect: NSMakeRect(0, 0, 640, 480),
styleMask: [.titled, .closable],
backing: .buffered,
defer: true
window.title = "Hello, world!"
app.activate(ignoringOtherApps: true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment