iOS 14
In our iOS 13 Permissions guide, we mentioned that iOS 13 introduced the request prompt that allows a user to grant location permission once, or while using the app, but not permanently.
In iOS 14, the user can now control the precision of location information in the request prompt. They can now choose to toggle the Precise: On and Precise: Off options. The default value is Precise: On.

Precise location information in the background is crucial to Zendrive SDK and our key features such as collision detection and automatic trip detection.
Recommended Action
We recommend treating the lack of precise location the same as missing location permission. If the precise location access is missing, prompt the user to grant the required permission. The following will only work on Xcode 12 (including betas) and above because the new location APIs are absent in Xcode 11.x and below.
Use the following code snippet to check for availability of precise location on iOS 14.
// Copyright (c) 2020 Zendrive. All rights reserved.
import UIKit
import CoreLocation
class ZDLocationManager: NSObject, CLLocationManagerDelegate {
private let locationManager: CLLocationManager
// This initializer should be called on main thread
override init() {
locationManager = CLLocationManager()
super.init()
locationManager.delegate = self
}
/// location permission changed callback for iOS13.x and below
func locationManager(_ manager: CLLocationManager,
didChangeAuthorization status: CLAuthorizationStatus) {
if status == .authorizedAlways {
print("location permission approved")
} else {
print("location permission denied")
}
}
/// location permission changed callback for iOS14 and above
/// if we don't implement this delegate, os will deliver the older
/// callback mentioned above as a fallback wherein we won't get the
/// precise location information.
@available(iOS 14.0, *)
func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
if manager.authorizationStatus == .authorizedAlways &&
manager.accuracyAuthorization == .fullAccuracy {
print("location permission approved")
} else {
print("location permission denied")
}
}
}
Prompt the user to enable precise location. The location settings has a toggle for Precise Location, which needs to be on.
Was this helpful?