Service

Objective-C

@interface Service : NSManagedObject

Swift

class Service : NSManagedObject

Represents a public transport service

Instance fields + methods

  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, getter = isRealTime) BOOL realTime

    Swift

    var isRealTime: Bool { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, getter = isRealTimeCapable) BOOL realTimeCapable

    Swift

    var isRealTimeCapable: Bool { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, getter = isCanceled) BOOL canceled

    Swift

    var isCanceled: Bool { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, getter = isBicycleAccessible) BOOL bicycleAccessible

    Swift

    var isBicycleAccessible: Bool { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray<StopVisits *> *sortedVisits

    Swift

    var sortedVisits: [StopVisits] { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *lineName

    Swift

    var lineName: String? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *direction

    Swift

    var direction: String? { get set }
  • Undocumented

    Declaration

    Objective-C

    - (nullable Alert *)sampleAlert;

    Swift

    func sampleAlert() -> Alert?
  • Undocumented

    Declaration

    Objective-C

    - (NSArray<Alert *> *)allAlerts;

    Swift

    func allAlerts() -> [Alert]
  • Undocumented

    Declaration

    Objective-C

    - (NSString *)title;

    Swift

    func title() -> String
  • Undocumented

    Declaration

    Objective-C

    - (nullable NSString *)shortIdentifier;

    Swift

    func shortIdentifier() -> String?
  • Undocumented

    Declaration

    Objective-C

    - (nullable StopVisits *)visitForStopCode:(NSString *)stopCode;

    Swift

    func visit(forStopCode stopCode: String) -> StopVisits?
  • Undocumented

    Declaration

    Objective-C

    - (NSArray<id<TKDisplayableRoute>> *)shapesForEmbarkation:(nullable StopVisits *)embarkation
                                                disembarkingAt:(nullable StopVisits *)disembarkation;
  • Undocumented

    Declaration

    Objective-C

    - (BOOL)looksLikeAnExpress;

    Swift

    func looksLikeAnExpress() -> Bool
  • Declaration

    Swift

    @nonobjc
    public class func fetchRequest() -> NSFetchRequest<Service>
  • Declaration

    Swift

    @NSManaged
    public var alertHashCodes: [NSNumber]? { get set }
  • Declaration

    Swift

    @NSManaged
    public var code: String { get set }
  • Declaration

    Swift

    @NSManaged
    public var color: TKColor? { get set }
  • Declaration

    Swift

    @NSManaged
    public var frequency: NSNumber? { get set }
  • Declaration

    Swift

    @NSManaged
    public var modeInfo: TKModeInfo? { get set }
  • Declaration

    Swift

    @NSManaged
    public var name: String? { get set }
  • Declaration

    Swift

    @NSManaged
    public var number: String? { get set }
  • Declaration

    Swift

    @NSManaged
    public var operatorID: String? { get set }
  • Declaration

    Swift

    @NSManaged
    public var operatorName: String? { get set }
  • Declaration

    Swift

    @NSManaged
    public var continuation: Service? { get set }
  • Declaration

    Swift

    @NSManaged
    public var progenitor: Service? { get set }
  • Declaration

    Swift

    @NSManaged
    public var segments: Set<SegmentReference>? { get set }
  • Declaration

    Swift

    @NSManaged
    public var shape: Shape? { get set }
  • Declaration

    Swift

    @NSManaged
    public var vehicle: Vehicle? { get set }
  • Declaration

    Swift

    @NSManaged
    public var vehicleAlternatives: Set<Vehicle>? { get set }
  • Declaration

    Swift

    @NSManaged
    public var visits: Set<StopVisits>? { get set }

Generated accessors for segments

  • Declaration

    Swift

    @objc(addSegmentsObject:)
    @NSManaged
    public func addToSegments(_ value: SegmentReference)
  • Declaration

    Swift

    @objc(removeSegmentsObject:)
    @NSManaged
    public func removeFromSegments(_ value: SegmentReference)
  • Declaration

    Swift

    @objc(addSegments:)
    @NSManaged
    public func addToSegments(_ values: NSSet)
  • Declaration

    Swift

    @objc(removeSegments:)
    @NSManaged
    public func removeFromSegments(_ values: NSSet)

Generated accessors for vehicleAlternatives

Generated accessors for visits

  • Declaration

    Swift

    @objc(addVisitsObject:)
    @NSManaged
    public func addToVisits(_ value: StopVisits)
  • Declaration

    Swift

    @objc(removeVisitsObject:)
    @NSManaged
    public func removeFromVisits(_ value: StopVisits)
  • Declaration

    Swift

    @objc(addVisits:)
    @NSManaged
    public func addToVisits(_ values: NSSet)
  • Declaration

    Swift

    @objc(removeVisits:)
    @NSManaged
    public func removeFromVisits(_ values: NSSet)

Insertions

  • Declaration

    Swift

    @objc(fetchOrInsertServiceWithCode:inTripKitContext:)
    public static func fetchOrInsert(code: String, in context: NSManagedObjectContext) -> Service
  • Declaration

    Swift

    @objc(fetchExistingServiceWithCode:inTripKitContext:)
    public static func fetchExistingService(code: String, in context: NSManagedObjectContext) -> Service?

Helpers

Wheelchair accessibility extensions

  • Accessibility of the service, i.e., a property of the vehicle. Note that whether you can get on the service will also depend on the accessibility of the stop. See StopVisits.getWheelchairAccessibility()

    Declaration

    Swift

    internal(set) var wheelchairAccessibility: TKWheelchairAccessibility { get set }