WireguardApp: macOS: Add App Intents to macOS app
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user