Skip to content

Commit 47ef861

Browse files
committed
Update ObservableLocationStreamer.swift
1 parent 626bc7a commit 47ef861

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/d3-async-location/viewmodel/ObservableLocationStreamer.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ public final class ObservableLocationStreamer: ILocationManagerViewModel{
4646

4747
// MARK: - Lifecycle
4848

49-
/// Initializes the `LocationStreamer`.
49+
/// Initializes the `ObservableLocationStreamer`.
5050
/// - Parameters:
5151
/// - strategy: Strategy for publishing updates. Default value is `.keepLast`.
5252
/// - accuracy: The accuracy of geographical coordinates.
5353
/// - activityType: The type of activity associated with location updates.
54-
/// - distanceFilter: The minimum distance (in meters) to trigger location updates.
54+
/// - distanceFilter: The minimum distance (in meters) that the device must move before an update event is generated. kCLDistanceFilterNone (equivalent to -1.0) means updates are sent regardless of the distance traveled. This is a safe default for apps that don’t require filtering updates based on distance.
5555
/// - backgroundUpdates: Indicates whether the app receives location updates when running in the background.
5656
public init(
5757
strategy: LocationStreamer.Strategy = .keepLast,
58-
accuracy: CLLocationAccuracy? = kCLLocationAccuracyBest,
59-
activityType: CLActivityType? = nil,
60-
distanceFilter: CLLocationDistance? = nil,
61-
backgroundUpdates: Bool = false
58+
_ accuracy: CLLocationAccuracy? = kCLLocationAccuracyBest,
59+
_ activityType: CLActivityType? = .other,
60+
_ distanceFilter: CLLocationDistance? = kCLDistanceFilterNone,
61+
_ backgroundUpdates: Bool = false
6262
) {
6363
self.strategy = strategy
6464
manager = .init(accuracy, activityType, distanceFilter, backgroundUpdates)

0 commit comments

Comments
 (0)