I use this code to check if I have access to the user location or not
if CLLocationManager.locationServicesEnabled() {
switch CLLocationManager.authorizationStatus() {
case .restricted, .denied:
hasPermission = false
default:
hasPermission = true
}
} else {
print("Location services are not enabled")
}
}
And Xcode(12) yells at me with this warning:
'authorizationStatus()' was deprecated in iOS 14.0
So what is the replacement?