@@ -44,42 +44,42 @@ public struct LocationUseCaseImpl: LocationUseCaseInterface {
4444 public init ( ) { }
4545
4646 public func getAuthorizationStatus( ) async -> CLAuthorizationStatus {
47- let locationManager = LocationPermissionManager . shared
47+ let locationManager = await LocationPermissionManager . shared
4848 return await locationManager. authorizationStatus
4949 }
5050
5151 public func requestLocationPermission( ) async -> CLAuthorizationStatus {
52- let locationManager = LocationPermissionManager . shared
52+ let locationManager = await LocationPermissionManager . shared
5353 return await locationManager. requestLocationPermission ( )
5454 }
5555
5656 public func requestFullAccuracy( ) async {
57- let locationManager = LocationPermissionManager . shared
57+ let locationManager = await LocationPermissionManager . shared
5858 await locationManager. requestFullAccuracy ( )
5959 }
6060
6161 public func startLocationUpdates(
6262 onUpdate: @escaping @Sendable ( CLLocation ) -> Void ,
6363 onError: @escaping @Sendable ( Error ) -> Void
6464 ) async {
65- let locationManager = LocationPermissionManager . shared
65+ let locationManager = await LocationPermissionManager . shared
6666 await locationManager. setLocationUpdateCallback ( onUpdate)
6767 await locationManager. setLocationErrorCallback ( onError)
6868 await locationManager. startLocationUpdates ( )
6969 }
7070
7171 public func stopLocationUpdates( ) async {
72- let locationManager = LocationPermissionManager . shared
72+ let locationManager = await LocationPermissionManager . shared
7373 await locationManager. stopLocationUpdates ( )
7474 }
7575
7676 public func requestCurrentLocation( ) async throws -> CLLocation ? {
77- let locationManager = LocationPermissionManager . shared
77+ let locationManager = await LocationPermissionManager . shared
7878 return try await locationManager. requestCurrentLocation ( )
7979 }
8080
8181 public func isLocationServicesEnabled( ) async -> Bool {
82- let locationManager = LocationPermissionManager . shared
82+ let locationManager = await LocationPermissionManager . shared
8383 return await locationManager. isLocationServicesEnabled ( )
8484 }
8585}
@@ -95,4 +95,4 @@ extension DependencyValues {
9595
9696private enum LocationUseCaseKey : DependencyKey {
9797 static let liveValue : LocationUseCaseInterface = LocationUseCaseImpl ( )
98- }
98+ }
0 commit comments