title: Location services not working in my macOS Application
body: <p>Location services not working in my macOS Application though I have enabled it
  Below is my swift code:      </p>
  
  <pre><code>        @IBAction func locateMe(_ sender: Any) {
          locationManager.delegate = self
          if #available(OSX 10.14, *) {
              locationManager.startUpdatingLocation()
          } 
          else {
              // Fallback on earlier versions
          }
          if CLLocationManager.locationServicesEnabled() {
              print("enabled")
  
              locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters
              locationManager.startUpdatingLocation()
          }
          else{
  
      print("Disabled")
          }
  
      }
      func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
          print("error:: \(error.localizedDescription)")
      }
  
      func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
          guard let locValue: CLLocationCoordinate2D = manager.location?.coordinate else { return }
          print("locations = \(locValue.latitude) \(locValue.longitude)")
  //        locationManager.stopUpdatingLocation();
      }
  </code></pre>
  
  <p>here disabled is printed
  But I have enabled location in system preferences as shown in picture below
  <a href="https://i.stack.imgur.com/2trht.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2trht.png" alt="enter image description here"></a></p>