Skip to content

Instantly share code, notes, and snippets.

@davidseek
Created September 5, 2018 17:55
Show Gist options
  • Select an option

  • Save davidseek/46a5a4c476d3e1b08e34a859b0143d9f to your computer and use it in GitHub Desktop.

Select an option

Save davidseek/46a5a4c476d3e1b08e34a859b0143d9f to your computer and use it in GitHub Desktop.
class LocationManager: NSObject {
// - Private
private let locationManager = CLLocationManager()
// - API
public var exposedLocation: CLLocation? {
return self.locationManager.location
}
override init() {
super.init()
self.locationManager.delegate = self
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest
self.locationManager.requestWhenInUseAuthorization()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment