TKLocationManager

public class TKLocationManager : NSObject, TKPermissionManager
extension TKLocationManager: CLLocationManagerDelegate

Undocumented

  • Undocumented

    See more

    Declaration

    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

Fetch

  • Undocumented

    Declaration

    Swift

    public func fetch(within interval: TimeInterval, completion: @escaping (Result<CLLocation, Error>) -> Void)

Subscribe

  • 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)

TKPermissionManager overrides

CLLocationManagerDelegate