use CLLocationManager directly to handle location updates since is more reliable in bg and more configurable

This commit is contained in:
Mauro Romito
2026-04-20 21:48:37 +02:00
committed by Mauro
parent 676c90c484
commit 53f6c66a8b
3 changed files with 129 additions and 46 deletions
@@ -7,16 +7,19 @@
import CoreLocation
/// Protocol for CLLocationManager used for authorization handling and location updates.
// sourcery: AutoMockable
protocol CLLocationManagerProtocol: AnyObject {
var delegate: CLLocationManagerDelegate? { get set }
var allowsBackgroundLocationUpdates: Bool { get set }
var showsBackgroundLocationIndicator: Bool { get set }
var desiredAccuracy: CLLocationAccuracy { get set }
var distanceFilter: CLLocationDistance { get set }
var pausesLocationUpdatesAutomatically: Bool { get set }
var authorizationStatus: CLAuthorizationStatus { get }
func requestAlwaysAuthorization()
func startUpdatingLocation()
func stopUpdatingLocation()
}
extension CLLocationManager: CLLocationManagerProtocol { }