New accuracy authorization in iOS 14
In WWDC 20, Apple introduced new location privacy authorization for iOS users is CLAccuracyAuthorization which includes: fullAccuracy and reducedAccuracy. What are they?
_fullAccuracy: _Receive accurate location information.
_reducedAccuracy: __Location estimates will have a horizontalAccuracy on the order of about 5km. Applications should be prepared to receive locations that are up to _20 minutes old.
How’s it looks like in iOS 14?
Where to get this status in code?
If you set a delegate for your locationManager, you can get the status in this function (from iOS 14)
func locationManagerDidChangeAuthorization(____ manager: CLLocationManager)_
The function above is the replacement for this function (which works for all iOS below 14)
func locationManager(____ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus)_
Here is sample code that handles which accuracy authorization is selected by users
#core-location #location #ios-14 #wwdc20 #swift