On-demand Rides and Deliveries Solution is currently available only to select partners. Contact sales to learn more.

GMTCTripService Class Reference

GMTCTripService Class Reference

Overview

Provides methods for accessing trip session(s).

Public Member Functions

(nullable GMTCTripModel *) - tripModelForTripName:
 Creates and returns an instance of GMTCTripModel by the given trip name.
(BOOL) - hasTripModelForTripName:
 Returns whether there has been a trip session created by the GMTCTripService.
(NSArray< GMTCTripModel * > *) - allTripModels
 Returns all the trip session objects created by this trip service.
(NSArray< GMTCTripModel * > *) - activeTripModels
 Returns all the trip session objects created by this trip service which are actively running.

Member Function Documentation

- (nullable GMTCTripModel *) tripModelForTripName: (NSString *)  tripName

Creates and returns an instance of GMTCTripModel by the given trip name.

If a trip session instance has already been created for the given trip name, then that instance will be returned. The instance of the TripModelcreated or retrieved can be configured via the `sessionOptions` of GMTCTripModel. Usually this `sessionOptions` property can be used to adjust the refresh time interval between the repeated trip info polling. see the comment in the class GMTCTripModelOptions for more details.

Parameters:
tripNameThe trip name for identifying a trip.
- (BOOL) hasTripModelForTripName: (NSString *)  tripName

Returns whether there has been a trip session created by the GMTCTripService.

Parameters:
tripNameThe trip name for identifying a trip.
- (NSArray<GMTCTripModel *> *) allTripModels

Returns all the trip session objects created by this trip service.

- (NSArray<GMTCTripModel *> *) activeTripModels

Returns all the trip session objects created by this trip service which are actively running.