I started getting a location error recently. I've never seen this error before and it began happeing randomly.
Here is the breakpoint. (if let locationManager........)
var currentLocation: Result<CLLocation, Error> {
get {
#if DEBUG
return .success(CLLocation(latitude: CLLocationDegrees(exactly: 0)!, longitude: CLLocationDegrees(exactly: 0)!))
#else
if let locationManager = self.locationManager {
return locationManager.currentLocation
}
return .failure(LocationError.unknown)
#endif
}
}
I've tried everything I can think of to fix the issue. It has an issue getting the users location when logging in.
I've made no changes to the code and everything has worked for years. The bug reports show nothing. I've tried re-installing Xcode, rebuilding the pods etc.
I've tried everything that you would normally do in this situation.