force quit swift application code example Example: swift quit app NSApplication.shared.terminate(self)