File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Sources/d3-async-location Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ extension LocationManagerAsync{
1414 @available ( iOS 14 . 0 , watchOS 7 . 0 , * )
1515 final class Delegate : NSObject , CLLocationManagerDelegate {
1616
17- /// Continuation asynchronously passing location data
18- var stream : Streaming ? {
17+ /// Continuation passing location data
18+ private var stream : Streaming ? {
1919 didSet {
2020 stream? . onTermination = { @Sendable [ weak self] termination in
2121 self ? . onTermination ( termination)
@@ -25,6 +25,11 @@ extension LocationManagerAsync{
2525
2626 // MARK: - Delegate
2727
28+ /// Set stream
29+ /// - Parameter continuation: Continuation passing location data
30+ public func setStream( with continuation : Streaming ) {
31+ stream = continuation
32+ }
2833
2934 /// Stop streaming
3035 public func finish( ) {
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ final class LocationManagerAsync: ILocationManagerAsync{
7878
7979 /// Start updating
8080 private func streaming( with continuation : Streaming ) {
81- delegate. stream = continuation
81+ delegate. setStream ( with : continuation)
8282 manager. startUpdatingLocation ( )
8383 }
8484
You can’t perform that action at this time.
0 commit comments