GoogleRidesharingDriver Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTDDriverContext
An object containing the dependencies needed to construct a GMTDDriverApi
instance.
-
Object that provides access tokens for interacting with the Fleet Engine backend.
Declaration
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 }
-
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.
-
Declaration
Objective-C
- (nonnull instancetype)init;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMTDDriverContext\u003c/code\u003e is an object that contains the necessary dependencies for creating a \u003ccode\u003eGMTDDriverApi\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003eIt requires an \u003ccode\u003eaccessTokenProvider\u003c/code\u003e to facilitate access token provision for interacting with the Fleet Engine backend.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eproviderID\u003c/code\u003e and \u003ccode\u003evehicleID\u003c/code\u003e are essential properties representing the Google Cloud project ID and the vehicle's unique identifier, respectively.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003enavigator\u003c/code\u003e property, associated with \u003ccode\u003eGMSMapView\u003c/code\u003e, is needed to monitor and track navigation changes.\u003c/p\u003e\n"],["\u003cp\u003eThe object must be initialized using \u003ccode\u003e-initWithAccessTokenProvider:providerID:vehicleID:navigator:\u003c/code\u003e to provide the necessary dependencies, while the \u003ccode\u003e-init\u003c/code\u003e method is unavailable.\u003c/p\u003e\n"]]],[],null,["# GoogleRidesharingDriver Framework Reference\n\nGMTDDriverContext\n=================\n\n @interface GMTDDriverContext : ../Classes/GMTSImmutableData.html\n\nAn object containing the dependencies needed to construct a `GMTDDriverApi` instance.\n- `\n ``\n ``\n `\n\n ### [accessTokenProvider](#/c:objc(cs)GMTDDriverContext(py)accessTokenProvider)\n\n `\n ` \n Object that provides access tokens for interacting with the Fleet Engine backend. \n\n #### Declaration\n\n Swift \n\n var accessTokenProvider: any ../Protocols/GMTDAuthorization.html { get }\n\n Objective-C \n\n @property (nonatomic, readonly) id\u003c../Protocols/GMTDAuthorization.html\u003e _Nonnull accessTokenProvider;\n\n- `\n ``\n ``\n `\n\n ### [providerID](#/c:objc(cs)GMTDDriverContext(py)providerID)\n\n `\n ` \n The ID for the Google Cloud project associated with the provider. \n\n #### Declaration\n\n Swift \n\n var providerID: String { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSString *_Nonnull providerID;\n\n- `\n ``\n ``\n `\n\n ### [vehicleID](#/c:objc(cs)GMTDDriverContext(py)vehicleID)\n\n `\n ` \n The ID associated with the vehicle. \n\n #### Declaration\n\n Swift \n\n var vehicleID: String { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly) ../Type-Definitions/GMTDFleetEngineIDString.html *_Nonnull vehicleID;\n\n- `\n ``\n ``\n `\n\n ### [navigator](#/c:objc(cs)GMTDDriverContext(py)navigator)\n\n `\n ` \n The navigator associated with the `GMSMapView`. Used to track navigation-related changes. \n\n #### Declaration\n\n Swift \n\n var navigator: GMSNavigator { get }\n\n Objective-C \n\n @property (nonatomic, readonly) GMSNavigator *_Nonnull navigator;\n\n- `\n ``\n ``\n `\n\n ### [-initWithAccessTokenProvider:providerID:vehicleID:navigator:](#/c:objc(cs)GMTDDriverContext(im)initWithAccessTokenProvider:providerID:vehicleID:navigator:)\n\n `\n ` \n Initializes the Driver Context object. \n\n #### Declaration\n\n Swift \n\n init(accessTokenProvider: any ../Protocols/GMTDAuthorization.html, providerID: String, vehicleID: String, navigator: GMSNavigator)\n\n Objective-C \n\n - (nonnull instancetype)\n initWithAccessTokenProvider:\n (nonnull id\u003c../Protocols/GMTDAuthorization.html\u003e)accessTokenProvider\n providerID:(nonnull NSString *)providerID\n vehicleID:(nonnull ../Type-Definitions/GMTDFleetEngineIDString.html *)vehicleID\n navigator:(nonnull GMSNavigator *)navigator;\n\n #### Parameters\n\n |-----------------------------|-------------------------------------------------------------------------------------------|\n | ` `*accessTokenProvider*` ` | Object that provides access tokens for interacting with the Fleet Engine backend. |\n | ` `*providerID*` ` | The ID for the Google Cloud project associated with the provider. |\n | ` `*vehicleID*` ` | The ID associated with the vehicle. |\n | ` `*navigator*` ` | The navigator associated with the `GMSMapView.` Used to track navigation-related changes. |\n\n #### Return Value\n\n An instance of the Driver Context.\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMTDDriverContext(im)init)\n\n `\n ` \n Unavailable \n Use [-initWithAccessTokenProvider:providerID:vehicleID:navigator:](../Classes/GMTDDriverContext.html#/c:objc(cs)GMTDDriverContext(im)initWithAccessTokenProvider:providerID:vehicleID:navigator:) instead. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;"]]