File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Sources/ComposableCoreLocation Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ public struct LocationManager {
268
268
@available ( watchOS, unavailable)
269
269
public var isRangingAvailable : ( ) -> Bool = { _unimplemented ( " isRangingAvailable " ) }
270
270
271
- var location : ( AnyHashable ) -> Location = { _ in _unimplemented ( " location " ) }
271
+ var location : ( AnyHashable ) -> Location ? = { _ in _unimplemented ( " location " ) }
272
272
273
273
public var locationServicesEnabled : ( ) -> Bool = { _unimplemented ( " locationServicesEnabled " ) }
274
274
@@ -389,7 +389,7 @@ public struct LocationManager {
389
389
@available ( tvOS, unavailable)
390
390
public func heading( id: AnyHashable ) -> Heading ? { self . heading ( id) }
391
391
392
- public func location( id: AnyHashable ) -> Location { self . location ( id) }
392
+ public func location( id: AnyHashable ) -> Location ? { self . location ( id) }
393
393
394
394
@available ( tvOS, unavailable)
395
395
@available ( watchOS, unavailable)
Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ extension LocationManager {
128
128
129
129
manager. locationServicesEnabled = CLLocationManager . locationServicesEnabled
130
130
131
+ manager. location = { id in dependencies [ id] ? . manager. location. map ( Location . init ( rawValue: ) ) }
132
+
131
133
manager. requestLocation = { id in
132
134
. fireAndForget { dependencies [ id] ? . manager. requestLocation ( ) }
133
135
}
You can’t perform that action at this time.
0 commit comments