In the LocationManager's desiredAccuracy documentation page, Apple says
If your app isn’t authorized to access precise location information (isAuthorizedForPreciseLocation is false), changes to this property’s value have no effect; the accuracy is always kCLLocationAccuracyReduced.
I can't find this attribute anywhere, and no documentation about it either. Can someone give me some insight into this, please?
Swift
if #available(iOS 14.0, *) {
if locationManager != nil {
switch locationManager!.accuracyAuthorization {
case .fullAccuracy:
print("Full Accuracy")
case .reducedAccuracy:
print("Reduced Accuracy")
@unknown default:
print("Unknown Precise Location...")
}
}
}
Desired accuracy is a new iOS 14 setting exposed to users in every app's location permission page like below.
If the user changes this to be off, this blocks beacon detections, core bluetooth scanning and nearby interaction scanning. Lat/lon location updates from CoreLocation are degraded to be similar to what you get from cell towers. Read more in my answer here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With