I’m getting
Domain=kCLErrorDomain Code=1
error in locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
(which means user didn’t allow to use location services) before app asks for location permission.
Is there a way to prevent that error or at least to check if location permission has been asked already?
2
Answers
Do you mean CLAuthorizationStatus? https://developer.apple.com/documentation/corelocation/clauthorizationstatus
You can watch changes in authorizations by defining
so you do not have to explicitly check the status each time you ask for a position.