I’m working on updating one of my apps to the asynchronous location updates API, but have been running into an unhelpful error.
Here's my code:
@Observable
class CurrentLocation: NSObject, CLLocationManagerDelegate {
private(set) var location: CLLocation?
private let locationManager = CLLocationManager()
override init() {
super.init()
self.locationManager.delegate = self
self.locationManager.desiredAccuracy = kCLLocationAccuracyReduced
}
func requestLocation() async throws {
print("requesting location")
requestAccess()
for try await update in CLLocationUpdate.liveUpdates() {
self.location = update.location
if update.isStationary {
break
}
}
}
}
But after calling requestLocation(), I receive the following error in the console without any location updates:
{"msg":"#locationUpdater received unhandled message", "Message":kCLConnectionMessageCompensatedLocation, "self":"0x600002eaa600"}
Googling this error yields absolutely no matches. I’ve ensured that I have the necessary Info.plist entries (as the old, synchronous location update code I have is also working without issues). I’d be grateful for any assistance!