Setup & Configuration

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface TKTripKit : NSObject
    
    @property (nonatomic, strong) NSManagedObjectModel          *managedObjectModel;
    @property (nonatomic, strong, null_resettable) NSPersistentStoreCoordinator  *persistentStoreCoordinator;
    @property (nonatomic, strong, null_resettable) NSManagedObjectContext        *tripKitContext;
    
    + (NSManagedObjectModel *)tripKitModel;
    
    + (NSBundle *)bundle;
    
    + (TKTripKit *)sharedInstance NS_REFINED_FOR_SWIFT;
    
    /**
     Reloads the coordinator and context, which will be set to new instances. Call this when using multiple TripKit instances in different processes and they went out of sync.
     */
    - (void)reload;
    
    /**
     Wipes TripKit and effectively clears the cache. Following calls to the context and coordinator will return new instances, so make sure you clear local references to those.
     */
    - (void)reset;
    
    /**
     The date TripKit was last reset when the context and coordinator were initialised. If you have multiple TripKit instances in different processes accessing the same underlying store, you can use this to determine if they are still in sync. If they aren't you'll likely want to call `reload` on the TripKit instance which wasn't reloaded since the other one was reset.
     
     @return Reset date as when the context/coordinator were initialised
     */
    - (nonnull NSDate *)resetDateFromInitialization;
    
    - (NSCache *)inMemoryCache;
    
    @end

    Swift

    class TKTripKit : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface TKConfig : NSObject
    
    + (TKConfig *)sharedInstance NS_REFINED_FOR_SWIFT;
    
    // Colors
    - (nullable NSDictionary *)globalTintColor;
    - (nullable NSDictionary *)globalAccentColor;
    - (nullable NSDictionary *)globalBarTintColor;
    - (nullable NSDictionary *)globalSecondaryBarTintColor;
    - (nullable NSDictionary *)globalViewBackgroundColor;
    - (BOOL)globalTranslucency;
    
    // Fonts
    - (nullable NSDictionary *)preferredFonts;
    
    // Complete raw config information
    @property (nonatomic, readonly) NSDictionary *configuration;
    
    @end

    Swift

    class TKConfig : NSObject
  • Declaration

    Swift

    public class TKRegion : NSObject, Codable
  • Declaration

    Swift

    public class TKRegionManager : NSObject
  • Encapsulates the logic for talking to SkedGo’s servers

    See more

    Declaration

    Objective-C

    @interface TKServer : NSObject

    Swift

    class TKServer : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface TKSettings : NSObject
    
    + (NSMutableDictionary *)defaultDictionary;
    
    /**
     The maximum walking duration is a per-segment limit for mixed results, i.e., it does not apply to walking-only trips.
     
     @param duration Seconds
     */
    + (void)setMaximumWalkingDuration:(NSTimeInterval)duration;
    
    /**
     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.
     @param duration Seconds, which will get rounded up to the next minute.
     */
    + (void)setMinimumTransferDuration:(NSTimeInterval)duration;
    
    /**
     Sets the profile weight for a specific component. Each component should be in the range of [0.1, 2.0], otherwise this is enforced server side. Weights of the components are relative to each other.
     @param weight New weight, preferably in range [0.1, 2.0]
     @param component The component for which to set this weight.
     */
    + (void)setProfileWeight:(float)weight forComponent:(TKSettingsProfileWeight)component;
    
    /**
     @param speed The new walking speed. Slow is roughly 2km/h, average 4km/h, fast 6km/h.
     */
    + (void)setWalkingSpeed:(TKSettingsSpeed)speed;
    
    /**
     @param speed The new cycling speed. Slow is roughly 8km/h, average 12km/h, fast 25km/h.
     */
    + (void)setCyclingSpeed:(TKSettingsSpeed)speed;
    
    /**
     @param gramsCO2PerKm Emissions for supplied mode identifier in grams of CO2 per kilometre
     @param modeIdentifier Mode identifier for which to apply these emissions
     */
    + (void)setEmissions:(float)gramsCO2PerKm forModeIdentifier:(NSString *)modeIdentifier;
    
    @end

    Swift

    class TKSettings : NSObject
  • Declaration

    Swift

    public class TKUserProfileHelper : NSObject