TKOneOffLocationManager

public class TKOneOffLocationManager : NSObject
extension TKOneOffLocationManager: CLLocationManagerDelegate

Undocumented

  • Undocumented

    Declaration

    Swift

    public override init()
  • Undocumented

    See more

    Declaration

    Swift

    public enum LocationFetchError : Error

Access

  • Whether user has granted any kind of access to the device’s location, when-in-use or always

    Declaration

    Swift

    @Published
    public var hasAccess: Bool { get set }
  • Whether it’s possible to bring up the system prompt to ask for access to the device’s location

    Declaration

    Swift

    public var canAsk: Bool { get }
  • Undocumented

    Declaration

    Swift

    public func ask(forBackground: Bool = false, _ handler: @escaping (Bool) -> Void = { _ in })
  • ask(forBackground:) Asynchronous

    Undocumented

    Declaration

    Swift

    @discardableResult
    public func ask(forBackground: Bool = false) async -> Bool

Location fetching

  • Undocumented

    Declaration

    Swift

    @Published
    public var currentLocation: CLLocation? { get set }
  • fetchCurrentLocation() Asynchronous

    Undocumented

    Declaration

    Swift

    public func fetchCurrentLocation() async throws -> CLLocation

CLLocationManagerDelegate