Skip to content

Commit 973a0a5

Browse files
authored
Merge pull request #8 from AsyncSwift/6-support-for-updating-accuracy
6 Support for updating accuracy
2 parents c1315be + e4ff26c commit 973a0a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/AsyncLocationKit/AsyncLocationManager.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public final class AsyncLocationManager {
5151
self.desiredAccuracy = desiredAccuracy
5252
}
5353

54+
public func updateAccuracy(with newAccuracy: LocationAccuracy) {
55+
locationManager.desiredAccuracy = newAccuracy.convertingAccuracy
56+
}
57+
5458
public func requestAuthorizationWhenInUse() async -> CLAuthorizationStatus {
5559
let authorizationPerformer = RequestAuthorizationPerformer()
5660
return await withTaskCancellationHandler {
@@ -193,7 +197,6 @@ public final class AsyncLocationManager {
193197
}
194198
locationManager.stopRangingBeacons(satisfying: satisfying)
195199
}
196-
197200
}
198201

199202
extension AsyncLocationManager {

0 commit comments

Comments
 (0)