TKLocationManager
public class TKLocationManager : NSObject, TKPermissionManager
extension TKLocationManager: CLLocationManagerDelegate
Undocumented
-
Undocumented
See moreDeclaration
Swift
public enum LocalizationError : Error
extension TKLocationManager.LocalizationError: LocalizedError
-
Undocumented
Declaration
Swift
public static let shared: TKLocationManager
-
Undocumented
Declaration
Swift
public private(set) var lastKnownUserLocation: CLLocation? { get set }
-
Undocumented
Declaration
Swift
public lazy var currentLocation: MKAnnotation { get set }
-
Undocumented
Declaration
Swift
public var openSettingsHandler: (() -> Void)?
-
Undocumented
Declaration
Swift
public func annotationIsCurrentLocation(_ annotation: MKAnnotation, orCloseEnough: Bool) -> Bool
-
Undocumented
Declaration
Swift
public func fetch(within interval: TimeInterval, completion: @escaping (Result<CLLocation, Error>) -> Void)
-
Subscripes to location updates and trigger the update block whenever the location changes enough.
Declaration
Swift
public func subscribe(id: AnyHashable, onUpdate: @escaping (CLLocation) -> Void)
Parameters
id
A token to use as an subscription identifier
onUpdate
Called on each location fix. If there’s a location fix already, it’ll trigger the update before returning!
-
Undocumented
Declaration
Swift
public func unsubscribe(id: AnyHashable)
-
Undocumented
Declaration
Swift
public func askForPermission(_ completion: @escaping (Bool) -> Void)
-
Undocumented
Declaration
Swift
public var featureIsAvailable: Bool { get }
-
Undocumented
Declaration
Swift
public var authorizationStatus: TKAuthorizationStatus { get }
-
Undocumented
Declaration
Swift
public var authorizationAlertText: String { get }
-
Undocumented
Declaration
Swift
public func locationManagerDidChangeAuthorization(_ manager: CLLocationManager)
-
Undocumented
Declaration
Swift
public func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus)
-
Undocumented
Declaration
Swift
public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])