From 888d27ed96c41ad43458aa49f99b95bbcb76fb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20John=20Pe=C3=B1a?= Date: Wed, 25 Jan 2023 20:07:52 +1100 Subject: [PATCH] [CoreWLANWirelessManager] Location Permission for BSSID Data. Fixes #129. (#139) As part of MacOS Catalina changes, it is now required to have location access to see BSSID data. Fixes #129. --- .../CoreWLANWirelessManager/AppDelegate.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CoreWLANWirelessManager/CoreWLANWirelessManager/AppDelegate.cs b/CoreWLANWirelessManager/CoreWLANWirelessManager/AppDelegate.cs index 8a94589..0d071f7 100644 --- a/CoreWLANWirelessManager/CoreWLANWirelessManager/AppDelegate.cs +++ b/CoreWLANWirelessManager/CoreWLANWirelessManager/AppDelegate.cs @@ -3,6 +3,7 @@ using CoreGraphics; using Foundation; using AppKit; using ObjCRuntime; +using CoreLocation; namespace CoreWLANWirelessManager { @@ -13,6 +14,12 @@ namespace CoreWLANWirelessManager public AppDelegate () { } + + public override void WillFinishLaunching(NSNotification notification) + { + var manager = new CLLocationManager(); + manager.RequestAlwaysAuthorization(); + } public override void DidFinishLaunching (NSNotification notification) {