TKSettings

@objc
public class TKSettings : NSObject

Undocumented

  • Undocumented

    See more

    Declaration

    Swift

    public enum DefaultsKey : String
  • Undocumented

    Declaration

    Swift

    public static var sortOrder: TKTripCostType { get set }
  • Undocumented

    Declaration

    Swift

    public static var minimumTransferTime: TimeInterval? { get set }
  • The minimum transfer duration applies for trips with more than one public transport segment. It sets the minimum time that the user needs to arrive at every public transport segment after the first one. In minutes, rounded up.

    Declaration

    Swift

    public static var minimumTransferMinutes: Double? { get set }
  • The maximum walking duration is a per-segment limit for mixed results, i.e., it does not apply to walking-only trips.

    Declaration

    Swift

    public static var maximumWalkingDuration: TimeInterval? { get set }
  • Whether to show wheelchair information and show routes as being on a wheelchair. This will set TripKit’s settings

    Declaration

    Swift

    @objc
    public class var showWheelchairInformation: Bool { get set }
  • Undocumented

    Declaration

    Swift

    public class var useConcessionPricing: Bool { get set }
  • Determine whether two-way-hire vehicles, such as pod-based car-share, should include the cost of returning the car-hire vehicle to its pick-up location. By default this is set to false and the cost of the trip only include the cost that’s attributed to this trip and ignore the unavoidable additional cost for returning the vehicle to its pick-up location. Set this to true if the cost of returning the vehicle to its pick-up location should be added to all one-way trips.

    Declaration

    Swift

    public static var includeCostToReturnCarHireVehicle: Bool { get set }
  • Undocumented

    See more

    Declaration

    Swift

    public struct Config : Equatable
    extension TKSettings.Config: Codable
  • Undocumented

    Declaration

    Swift

    public static let parserJsonVersion: Int
  • Undocumented

    Declaration

    Swift

    public static var config: [String : Any] { get }

Weights

  • Undocumented

    See more

    Declaration

    Swift

    public enum Weight : String, Codable, CaseIterable
  • Undocumented

    Declaration

    Swift

    public static subscript(weight: TKSettings.Weight) -> Double { get set }

Speeds

  • Undocumented

    See more

    Declaration

    Swift

    public enum Speed : Equatable
    extension TKSettings.Speed: Codable
  • The cycling speed. Slow is roughly 8km/h, average 12km/h, fast 25km/h.

    Declaration

    Swift

    public static var cyclingSpeed: Speed { get set }
  • The walking speed. Slow is roughly 2km/h, average 4km/h, fast 6km/h.

    Declaration

    Swift

    public static var walkingSpeed: Speed { get set }

Enabled transport modes

Preferred/disliked public transit modes

  • Undocumented

    Declaration

    Swift

    public static func setTransitMode(_ identifier: String, asDisliked disliked: Bool)
  • Undocumented

    Declaration

    Swift

    public static var dislikedTransitModes: Set<String> { get set }

Mode by mode, Mode picker

Emissions

  • Declaration

    Swift

    public class func setEmissions(gramsCO2PerKm: Double, modeIdentifier: String)

    Parameters

    gramsCO2PerKm

    Emissions for supplied mode identifier in grams of CO2 per kilometre

    modeIdentifier

    Mode identifier for which to apply these emissions

  • Undocumented

    Declaration

    Swift

    public class func clearEmissions()
  • Undocumented

    Declaration

    Swift

    public class var transportEmissions: [String : Double] { get }

Notifications

  • The minutes before a trip’s start that the “Time to leave” notification should fire. Defaults to 15 (minutes)

    Declaration

    Swift

    public static var notificationTimeToLeaveHeadway: Int { get set }