For those who are trying to do it fast.
if CLLocationManager.locationServicesEnabled() {
switch(CLLocationManager.authorizationStatus()) {
case .NotDetermined, .Restricted, .Denied:
println("No access")
case .AuthorizedAlways, .AuthorizedWhenInUse:
println("Access")
default:
println("...")
}
} else {
println("Location services are not enabled")
}
source
share