Skip to content

Commit

Permalink
Fix issues with LocationApplication (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLeif authored Dec 20, 2023
1 parent 5e7a391 commit 4e93f97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ open class LocationApplication: LifecyleApplication, CLLocationManagerDelegate {
open func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { }
open func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { }
open func locationManager(_ manager: CLLocationManager, didRange beacons: [CLBeacon], satisfying beaconConstraint: CLBeaconIdentityConstraint) { }
open func locationManager(_ manager: CLLocationManager, didUpdateTo newLocation: CLLocation, from oldLocation: CLLocation) { }
open func locationManager(_ manager: CLLocationManager, didStartMonitoringFor region: CLRegion) { }
open func locationManager(_ manager: CLLocationManager, didDetermineState state: CLRegionState, for region: CLRegion) { }
open func locationManager(_ manager: CLLocationManager, didFailRangingFor beaconConstraint: CLBeaconIdentityConstraint, error: Error) { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import AppState
import CoreLocation

fileprivate extension Application {
private extension Application {
var coreLocationManager: Dependency<CLLocationManager> {
dependency(CLLocationManager())
}
}

/// A class that wraps around a CLLocationManager instance from AppState's Application singleton.
open class LocationManager {
@AppDependency(\.coreLocationManager) private var manager: CLLocationManager
@AppDependency(\.coreLocationManager) public var manager: CLLocationManager

/// The delegate object to receive update events.
public var delegate: CLLocationManagerDelegate? {
Expand Down

0 comments on commit 4e93f97

Please sign in to comment.