diff options
Diffstat (limited to 'Sources/WireGuardApp/UI/macOS/Application.swift')
-rw-r--r-- | Sources/WireGuardApp/UI/macOS/Application.swift | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Sources/WireGuardApp/UI/macOS/Application.swift b/Sources/WireGuardApp/UI/macOS/Application.swift new file mode 100644 index 0000000..261ee8a --- /dev/null +++ b/Sources/WireGuardApp/UI/macOS/Application.swift @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. + +import Cocoa + +class Application: NSApplication { + + private var appDelegate: AppDelegate? // swiftlint:disable:this weak_delegate + + override init() { + super.init() + appDelegate = AppDelegate() // Keep a strong reference to the app delegate + delegate = appDelegate // Set delegate before app.run() gets called in NSApplicationMain() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} |