File tree 2 files changed +8
-3
lines changed
Sources/d3-async-location
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ extension LocationManagerAsync{
14
14
@available ( iOS 14 . 0 , watchOS 7 . 0 , * )
15
15
final class Delegate : NSObject , CLLocationManagerDelegate {
16
16
17
- /// Continuation asynchronously passing location data
18
- var stream : Streaming ? {
17
+ /// Continuation passing location data
18
+ private var stream : Streaming ? {
19
19
didSet {
20
20
stream? . onTermination = { @Sendable [ weak self] termination in
21
21
self ? . onTermination ( termination)
@@ -25,6 +25,11 @@ extension LocationManagerAsync{
25
25
26
26
// MARK: - Delegate
27
27
28
+ /// Set stream
29
+ /// - Parameter continuation: Continuation passing location data
30
+ public func setStream( with continuation : Streaming ) {
31
+ stream = continuation
32
+ }
28
33
29
34
/// Stop streaming
30
35
public func finish( ) {
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ final class LocationManagerAsync: ILocationManagerAsync{
78
78
79
79
/// Start updating
80
80
private func streaming( with continuation : Streaming ) {
81
- delegate. stream = continuation
81
+ delegate. setStream ( with : continuation)
82
82
manager. startUpdatingLocation ( )
83
83
}
84
84
You can’t perform that action at this time.
0 commit comments