WireguardApp: macOS: Add App Intents to macOS app

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
This commit is contained in:
Alessio Nossa
2023-04-12 00:05:14 +02:00
parent ee035362ec
commit 97bf1c1309
2 changed files with 15 additions and 0 deletions
@@ -3,6 +3,7 @@
import Cocoa
import ServiceManagement
import AppIntents
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
@@ -58,6 +59,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
self.tunnelsTracker = tunnelsTracker
self.statusItemController = statusItemController
if #available(macOS 13.0, *) {
AppDependencyManager.shared.add(dependency: tunnelsManager)
}
if !isLaunchedAtLogin {
self.showManageTunnelsWindow(completion: nil)
}