AI-generated Key Takeaways
-
GMTDDriverContextis an object that contains the necessary dependencies for creating aGMTDDriverApiinstance. -
It requires an
accessTokenProviderto facilitate access token provision for interacting with the Fleet Engine backend. -
The
providerIDandvehicleIDare essential properties representing the Google Cloud project ID and the vehicle's unique identifier, respectively. -
A
navigatorproperty, associated withGMSMapView, is needed to monitor and track navigation changes. -
The object must be initialized using
-initWithAccessTokenProvider:providerID:vehicleID:navigator:to provide the necessary dependencies, while the-initmethod is unavailable.
GMTDDriverContext
@interface GMTDDriverContext : GMTSImmutableDataAn 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
accessTokenProviderObject that provides access tokens for interacting with the Fleet Engine backend.
providerIDThe ID for the Google Cloud project associated with the provider.
vehicleIDThe ID associated with the vehicle.
navigatorThe 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;