Trip

@objc(Trip)
public class Trip : NSManagedObject
extension Trip: UIActivityItemSource
extension Trip: Comparable
extension Trip: TKURLShareable, TKURLSavable

Undocumented

  • All associated segment in their correct order.

    Declaration

    Swift

    public var segments: [TKSegment] { get }
  • Note

    Only includes walking if it’s a walking-only trip!

    Declaration

    Swift

    public lazy var usedModeIdentifiers: Set<String> { get set }
  • Whether this trip has at least one reminder and the reminder icon should be displayed.

    Declaration

    Swift

    public var hasReminder: Bool
  • Undocumented

    Declaration

    Swift

    public override func didTurnIntoFault()
  • Undocumented

    Declaration

    Swift

    @objc
    public var request: TripRequest! { get }
  • Undocumented

    Declaration

    Swift

    @objc
    public var shareURL: URL? { get set }
  • Undocumented

    Declaration

    Swift

    public var saveURL: URL? { get }
  • Undocumented

    Declaration

    Swift

    public func setAsPreferredTrip()
  • Undocumented

    Declaration

    Swift

    public var departureTimeZone: TimeZone { get }
  • Undocumented

    Declaration

    Swift

    public var arrivalTimeZone: TimeZone? { get }
  • Undocumented

    Declaration

    Swift

    public var isArriveBefore: Bool { get }
  • Offset in seconds from the specified departure/arrival time. E.g., if you asked for arrive-by, it’ll use the arrival time.

    If the trip does not satisfy the requested time, it’s negative.

    Declaration

    Swift

    public func calculateOffset() -> TimeInterval
  • Undocumented

    Declaration

    Swift

    public static func find(tripURL: URL, in context: NSManagedObjectContext) -> Trip?
  • Undocumented

    Declaration

    Swift

    public var tripURL: URL { get }

Segments

  • Undocumented

    Declaration

    Swift

    public var mainSegment: TKSegment { get }
  • Undocumented

    Declaration

    Swift

    @objc(segmentsWithVisibility:)
    public func segments(with type: TKTripSegmentVisibility) -> [TKSegment]
  • Undocumented

    Declaration

    Swift

    public var allPublicTransport: [TKSegment] { get }
  • Checks for intermodality. Ignores very short walks and, optionally, all walks.

    Declaration

    Swift

    public func isMixedModal(ignoreWalking: Bool) -> Bool

    Parameters

    ignoreWalking

    If walks should be ignored completely

    Return Value

    If trip is mixed modal (aka intermodmal)

Visits

Real-time

  • Undocumented

    Declaration

    Swift

    public var isImpossible: Bool { get }
  • Undocumented

    Declaration

    Swift

    public var timesAreRealTime: Bool { get }
  • Undocumented

    Declaration

    Swift

    public var primaryAlert: Alert? { get }

Notifications

Vehicles

  • If the trip uses a personal vehicle (non shared) which the user might want to assign to one of their vehicles

    Declaration

    Swift

    public var usedPrivateVehicleType: TKVehicleType { get }
  • Declaration

    Swift

    public func assign(_ vehicle: TKVehicular?)

    Parameters

    vehicle

    The vehicle to assign this trip to. nil to reset to a generic vehicle.

  • Mapping of boxed TKTripCostType to strings of their values.

    Declaration

    Swift

    public var costValues: [TKTripCostType : String] { get }
  • Undocumented

    Declaration

    Swift

    @objc
    public func constructPlainText() -> String
  • Something like: 11:10-16:00; W-C-B-T-W; $3, 50m, 2kg, 5h, $total

    Declaration

    Swift

    public var debugString: String { get }

Accessibility

  • Undocumented

    Declaration

    Swift

    public override var accessibilityLabel: String? { get set }

UIActivityItemSource

  • Undocumented

    Declaration

    Swift

    public func activityViewControllerPlaceholderItem(_ activityViewController: UIActivityViewController) -> Any
  • Undocumented

    Declaration

    Swift

    public func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivity.ActivityType?) -> Any?
  • Undocumented

    Declaration

    Swift

    public func activityViewController(_ activityViewController: UIActivityViewController, subjectForActivityType activityType: UIActivity.ActivityType?) -> String
  • Undocumented

    Declaration

    Swift

    @nonobjc
    public class func fetchRequest() -> NSFetchRequest<Trip>
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var arrivalTime: Date! { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var budgetPoints: NSNumber? { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var currencyCode: String? { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var departureTime: Date! { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var logURLString: String? { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var minutes: Int16 { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var plannedURLString: String? { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var progressURLString: String? { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var temporaryURLString: String? { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var totalCalories: Float { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var totalCarbon: Float { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var totalHassle: Float { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var totalPrice: NSNumber? { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var totalPriceUSD: NSNumber? { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var totalScore: Float { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var totalWalking: Float { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var updateURLString: String? { get set }
  • Undocumented

    Declaration

    Swift

    @NSManaged
    public var tripGroup: TripGroup { get set }
  • Additional information when a trip is not available, e.g., due to missing the booking window or it being cancelled. This is localised and meant to be user-facing.

    Declaration

    Swift

    public var availabilityInfo: String? { get set }
  • Undocumented

    Declaration

    Swift

    public var bundleId: String? { get set }
  • Unique ID of the trip, which may change if the trip is saved in permanent storage (although it is unlikely).

    Declaration

    Swift

    public var tripId: String? { get set }
  • Undocumented

    Declaration

    Swift

    public var subscribeURL: URL? { get set }
  • Undocumented

    Declaration

    Swift

    public var unsubscribeURL: URL? { get set }
  • Undocumented

    Declaration

    Swift

    public var showNoVehicleUUIDAsLift: Bool { get set }
  • Undocumented

    Declaration

    Swift

    public var departureTimeIsFixed: Bool { get set }
  • Undocumented

    Declaration

    Swift

    public var missedBookingWindow: Bool { get set }
  • Undocumented

    Declaration

    Swift

    public var hideExactTimes: Bool { get set }
  • Undocumented

    Declaration

    Swift

    public var isCanceled: Bool { get set }
  • Declaration

    Swift

    public static func < (lhs: Trip, rhs: Trip) -> Bool