GoogleRidesharingDriver Framework Reference

GMTDDriverContext

@interface GMTDDriverContext : GMTSImmutableData

An object containing the dependencies needed to construct a GMTDDriverApi instance.

  • Object that provides access tokens for interacting with the Fleet Engine backend.

    Declaration

    Swift

    var accessTokenProvider: any GMTDAuthorization { get }

    Objective-C

    @property (nonatomic, readonly) id<GMTDAuthorization> _Nonnull accessTokenProvider;
  • The ID for the Google Cloud project associated with the provider.

    Declaration

    Swift

    var providerID: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull providerID;
  • The ID associated with the vehicle.

    Declaration

    Swift

    var vehicleID: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) GMTDFleetEngineIDString *_Nonnull vehicleID;
  • The navigator associated with the GMSMapView. Used to track navigation-related changes.

    Declaration

    Swift

    var navigator: GMSNavigator { get }

    Objective-C

    @property (nonatomic, readonly) GMSNavigator *_Nonnull navigator;
  • Initializes the Driver Context object.

    Declaration

    Swift

    init(accessTokenProvider: any GMTDAuthorization, providerID: String, vehicleID: String, navigator: GMSNavigator)

    Objective-C

    - (nonnull instancetype)
        initWithAccessTokenProvider:
            (nonnull id<GMTDAuthorization>)accessTokenProvider
                         providerID:(nonnull NSString *)providerID
                          vehicleID:(nonnull GMTDFleetEngineIDString *)vehicleID
                          navigator:(nonnull GMSNavigator *)navigator;

    Parameters

    accessTokenProvider

    Object that provides access tokens for interacting with the Fleet Engine backend.

    providerID

    The ID for the Google Cloud project associated with the provider.

    vehicleID

    The ID associated with the vehicle.

    navigator

    The navigator associated with the GMSMapView. Used to track navigation-related changes.

    Return Value

    An instance of the Driver Context.

  • Unavailable

    Declaration

    Objective-C

    - (nonnull instancetype)init;