You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// The asynchronous locations manager responsible for streaming updates.
47
+
/// Handles the actual location updates asynchronously.
41
48
privateletmanager:LocationManagerAsync
42
49
43
-
/// Indicates whether the streaming process is idle.
50
+
/// Checks if the streaming process is idle.
51
+
/// A computed property for convenience.
44
52
@MainActor
45
53
publicvarisIdle:Bool{
46
54
return state ==.idle
47
55
}
48
56
49
57
// MARK: - Lifecycle
50
58
51
-
/// Initializes the `LocationStreamer`.
59
+
/// Initializes the `LocationStreamer` with configurable parameters.
52
60
/// - Parameters:
53
-
/// - strategy: Strategy for publishing updates. Default value is `.keepLast`.
54
-
/// - accuracy: The accuracy of geographical coordinates.
55
-
/// - activityType: The type of activity associated with location updates.
56
-
/// - 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.
57
-
/// - backgroundUpdates: Indicates whether the app receives location updates when running in the background.
61
+
/// - strategy: A `LocationResultStrategy` for managing location results. Defaults to `KeepLastStrategy`.
62
+
/// - accuracy: Specifies the desired accuracy of location updates. Defaults to `kCLLocationAccuracyBest`.
63
+
/// - activityType: The type of activity for location updates (e.g., automotive, fitness). Defaults to `.other`.
64
+
/// - distanceFilter: The minimum distance (in meters) before generating an update. Defaults to `kCLDistanceFilterNone` (no filtering).
65
+
/// - backgroundUpdates: Whether the app should continue receiving location updates in the background. Defaults to `false`.
0 commit comments