AI-generated Key Takeaways
-
GMTDDriverContext
is an object that contains the necessary dependencies for creating aGMTDDriverApi
instance. -
It requires an
accessTokenProvider
to facilitate access token provision for interacting with the Fleet Engine backend. -
The
providerID
andvehicleID
are essential properties representing the Google Cloud project ID and the vehicle's unique identifier, respectively. -
A
navigator
property, 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-init
method is unavailable.
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;