GoogleRidesharingDriver Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTDRidesharingDriverAPI
A class that provide access to all the core components and serves as the entry point for the
ridesharing use case.
-
The vehicle reporter used to send updates to the Fleet Engine backend.
-
Initializes the API.
After initialization, driver APIs from different verticals should not be used until this instance
has been deallocated. Using driver API instances from multiple verticals in the same SDK session
can lead to unexpected behavior.
Declaration
Objective-C
- (nullable instancetype)initWithDriverContext:
(nonnull GMTDDriverContext *)driverContext;
Parameters
driverContext
|
An object containing the necessary information for initialization.
|
Return Value
An instance of the API.
-
Use initWithDriverContext:
instead.
Declaration
Objective-C
- (null_unspecified 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\u003eGMTDRidesharingDriverAPI\u003c/code\u003e serves as the central access point for core ridesharing components within the driver's application.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003evehicleReporter\u003c/code\u003e property allows for sending vehicle updates to the Fleet Engine backend.\u003c/p\u003e\n"],["\u003cp\u003eThe API must be initialized using the \u003ccode\u003einitWithDriverContext:\u003c/code\u003e method, providing essential setup data.\u003c/p\u003e\n"],["\u003cp\u003eUsing driver APIs from different verticals simultaneously in the same SDK session is not supported and may lead to issues.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003einit\u003c/code\u003e method is unavailable and the \u003ccode\u003einitWithDriverContext\u003c/code\u003e should be used instead for proper initialization.\u003c/p\u003e\n"]]],[],null,["# GoogleRidesharingDriver Framework Reference\n\nGMTDRidesharingDriverAPI\n========================\n\n @interface GMTDRidesharingDriverAPI : ../Classes/GMTDDriverAPI.html\n\nA class that provide access to all the core components and serves as the entry point for the\nridesharing use case.\n- `\n ``\n ``\n `\n\n ### [vehicleReporter](#/c:objc(cs)GMTDRidesharingDriverAPI(py)vehicleReporter)\n\n `\n ` \n The vehicle reporter used to send updates to the Fleet Engine backend. \n\n #### Declaration\n\n Swift \n\n var vehicleReporter: ../Classes/GMTDVehicleReporter.html { get }\n\n Objective-C \n\n @property (nonatomic, readonly) ../Classes/GMTDVehicleReporter.html *_Nonnull vehicleReporter;\n\n- `\n ``\n ``\n `\n\n ### [-initWithDriverContext:](#/c:objc(cs)GMTDRidesharingDriverAPI(im)initWithDriverContext:)\n\n `\n ` \n Initializes the API.\n\n After initialization, driver APIs from different verticals should not be used until this instance\n has been deallocated. Using driver API instances from multiple verticals in the same SDK session\n can lead to unexpected behavior. \n\n #### Declaration\n\n Swift \n\n init?(driverContext: ../Classes/GMTDDriverContext.html)\n\n Objective-C \n\n - (nullable instancetype)initWithDriverContext:\n (nonnull ../Classes/GMTDDriverContext.html *)driverContext;\n\n #### Parameters\n\n |-----------------------|--------------------------------------------------------------------|\n | ` `*driverContext*` ` | An object containing the necessary information for initialization. |\n\n #### Return Value\n\n An instance of the API.\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMTDRidesharingDriverAPI(im)init)\n\n `\n ` \n Unavailable \n Use `initWithDriverContext:` instead. \n\n #### Declaration\n\n Objective-C \n\n - (null_unspecified instancetype)init;"]]