Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var locationManager = CLLocationManager()
locationManager.requestAlwaysAuthorization()
//or use requestWhenInUseAuthorization()
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.startUpdatingLocation()
locationManager.allowsBackgroundLocationUpdates = true
locationManager.pausesLocationUpdatesAutomatically = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment