GoogleRidesharingConsumer Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTCJourneySharingSession
@interface GMTCJourneySharingSession : NSObject <GMTCMapViewSession>
/** Delegate of the current journey sharing session. */
@property(nonatomic, nullable, weak) id<GMTCMapViewSessionDelegate> delegate;
/**
* Returns the current session state. The possible state can be referenced from
* `GMTCMapViewSessionState`.
*/
@property(nonatomic, readonly) GMTCMapViewSessionState state;
/** Returns the host map view of the current session. */
@property(nonatomic, nullable, weak, readonly) GMTCMapView *hostMapView;
/** Returns the associated trip session. */
@property(nonatomic, readonly) GMTCTripModel *tripModel;
/**
* Initializes the session object.
*
* @param tripModel The target trip request.
*/
- (instancetype)initWithTripModel:(GMTCTripModel *)tripModel;
- (instancetype)init NS_UNAVAILABLE;
@end
-
Delegate of the current journey sharing session.
-
-
Returns the host map view of the current session.
Declaration
Objective-C
@property (nonatomic, weak, readonly, nullable) GMTCMapView *hostMapView;
-
Returns the associated trip session.
Declaration
Objective-C
@property (nonatomic, readonly) GMTCTripModel *_Nonnull tripModel;
-
Initializes the session object.
Declaration
Objective-C
- (nonnull instancetype)initWithTripModel:(nonnull GMTCTripModel *)tripModel;
-
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;
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\u003eThe \u003ccode\u003eGMTCJourneySharingSession\u003c/code\u003e class manages a journey sharing session, providing properties to access the session's delegate, current state, host map view, and associated trip model.\u003c/p\u003e\n"],["\u003cp\u003eThe session's \u003ccode\u003edelegate\u003c/code\u003e property allows for interaction with the session events and updates via the \u003ccode\u003eGMTCMapViewSessionDelegate\u003c/code\u003e protocol.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003estate\u003c/code\u003e property reflects the current operational state of the sharing session, with possible states defined in \u003ccode\u003eGMTCMapViewSessionState\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ehostMapView\u003c/code\u003e property provides access to the map view used in the session.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etripModel\u003c/code\u003e property links the session to a specific trip, represented by \u003ccode\u003eGMTCTripModel\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# GoogleRidesharingConsumer Framework Reference\n\nGMTCJourneySharingSession\n=========================\n\n @interface GMTCJourneySharingSession : NSObject \u003c../Protocols/GMTCMapViewSession.html\u003e\n\n /** Delegate of the current journey sharing session. */\n @property(nonatomic, nullable, weak) id\u003c../Protocols/GMTCMapViewSessionDelegate.html\u003e delegate;\n\n /**\n * Returns the current session state. The possible state can be referenced from\n * `GMTCMapViewSessionState`.\n */\n @property(nonatomic, readonly) ../Enums/GMTCMapViewSessionState.html state;\n\n /** Returns the host map view of the current session. */\n @property(nonatomic, nullable, weak, readonly) ../Classes/GMTCMapView.html *hostMapView;\n\n /** Returns the associated trip session. */\n @property(nonatomic, readonly) ../Classes/GMTCTripModel.html *tripModel;\n\n /**\n * Initializes the session object.\n *\n * @param tripModel The target trip request.\n */\n - (instancetype)initWithTripModel:(../Classes/GMTCTripModel.html *)tripModel;\n\n - (instancetype)init NS_UNAVAILABLE;\n\n @end\n\n- `\n ``\n ``\n `\n\n ### [delegate](#/c:objc(cs)GMTCJourneySharingSession(py)delegate)\n\n `\n ` \n Delegate of the current journey sharing session. \n\n #### Declaration\n\n Swift \n\n weak var delegate: (any ../Protocols/GMTCMapViewSessionDelegate.html)? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) id\u003c../Protocols/GMTCMapViewSessionDelegate.html\u003e delegate;\n\n- `\n ``\n ``\n `\n\n ### [state](#/c:objc(cs)GMTCJourneySharingSession(py)state)\n\n `\n ` \n Returns the current session state. The possible state can be referenced from\n [GMTCMapViewSessionState](../Enums/GMTCMapViewSessionState.html). \n\n #### Declaration\n\n Swift \n\n var state: ../Enums/GMTCMapViewSessionState.html { get }\n\n Objective-C \n\n @property (nonatomic, readonly) ../Enums/GMTCMapViewSessionState.html state;\n\n- `\n ``\n ``\n `\n\n ### [hostMapView](#/c:objc(cs)GMTCJourneySharingSession(py)hostMapView)\n\n `\n ` \n Returns the host map view of the current session. \n\n #### Declaration\n\n Swift \n\n weak var hostMapView: ../Classes/GMTCMapView.html? { get }\n\n Objective-C \n\n @property (nonatomic, weak, readonly, nullable) ../Classes/GMTCMapView.html *hostMapView;\n\n- `\n ``\n ``\n `\n\n ### [tripModel](#/c:objc(cs)GMTCJourneySharingSession(py)tripModel)\n\n `\n ` \n Returns the associated trip session. \n\n #### Declaration\n\n Swift \n\n var tripModel: ../Classes/GMTCTripModel.html { get }\n\n Objective-C \n\n @property (nonatomic, readonly) ../Classes/GMTCTripModel.html *_Nonnull tripModel;\n\n- `\n ``\n ``\n `\n\n ### [-initWithTripModel:](#/c:objc(cs)GMTCJourneySharingSession(im)initWithTripModel:)\n\n `\n ` \n Initializes the session object. \n\n #### Declaration\n\n Swift \n\n init(tripModel: ../Classes/GMTCTripModel.html)\n\n Objective-C \n\n - (nonnull instancetype)initWithTripModel:(nonnull ../Classes/GMTCTripModel.html *)tripModel;\n\n #### Parameters\n\n |-------------------|--------------------------|\n | ` `*tripModel*` ` | The target trip request. |\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMTCJourneySharingSession(im)init)\n\n `\n ` \n Unavailable \n\n #### Declaration\n\n Objective-C \n\n - (instancetype)init NS_UNAVAILABLE;"]]