From 70eeae1345872e2c8db824e3e36f63ebd53b302e Mon Sep 17 00:00:00 2001 From: Basem Emara Date: Sat, 2 Nov 2019 11:25:44 -0400 Subject: [PATCH] Ensure authorization callback only after response --- Sources/ZamzamLocation/LocationWorker.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/ZamzamLocation/LocationWorker.swift b/Sources/ZamzamLocation/LocationWorker.swift index aab80ef5..a1db218a 100644 --- a/Sources/ZamzamLocation/LocationWorker.swift +++ b/Sources/ZamzamLocation/LocationWorker.swift @@ -250,6 +250,8 @@ public extension LocationWorker { extension LocationWorker: CLLocationManagerDelegate { public func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { + guard status != .notDetermined else { return } + // Trigger and empty queues let recurringHandlers = self.didChangeAuthorizationHandlers.value recurringHandlers.forEach { task in