# GMTCJourneySharingSession

    @interface GMTCJourneySharingSession : NSObject <https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Protocols/GMTCMapViewSession.html>

    /** Delegate of the current journey sharing session. */
    @property(nonatomic, nullable, weak) id<https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Protocols/GMTCMapViewSessionDelegate.html> delegate;

    /**
     * Returns the current session state. The possible state can be referenced from
     * `GMTCMapViewSessionState`.
     */
    @property(nonatomic, readonly) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTCMapViewSessionState.html state;

    /** Returns the host map view of the current session. */
    @property(nonatomic, nullable, weak, readonly) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCMapView.html *hostMapView;

    /** Returns the associated trip session. */
    @property(nonatomic, readonly) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCTripModel.html *tripModel;

    /**
     * Initializes the session object.
     *
     * @param tripModel The target trip request.
     */
    - (instancetype)initWithTripModel:(https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCTripModel.html *)tripModel;

    - (instancetype)init NS_UNAVAILABLE;

    @end

- `


  ### [delegate](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCJourneySharingSession#/c:objc(cs)GMTCJourneySharingSession(py)delegate)


  ` Delegate of the current journey sharing session.

  #### Declaration

  Swift

      weak var delegate: (any https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Protocols/GMTCMapViewSessionDelegate.html)? { get set }

  Objective-C

      @property (nonatomic, weak, nullable) id<https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Protocols/GMTCMapViewSessionDelegate.html> delegate;

- `


  ### [state](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCJourneySharingSession#/c:objc(cs)GMTCJourneySharingSession(py)state)


  ` Returns the current session state. The possible state can be referenced from
  `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTCMapViewSessionState.html`.

  #### Declaration

  Swift

      var state: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTCMapViewSessionState.html { get }

  Objective-C

      @property (nonatomic, readonly) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTCMapViewSessionState.html state;

- `


  ### [hostMapView](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCJourneySharingSession#/c:objc(cs)GMTCJourneySharingSession(py)hostMapView)


  ` Returns the host map view of the current session.

  #### Declaration

  Swift

      weak var hostMapView: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCMapView.html? { get }

  Objective-C

      @property (nonatomic, weak, readonly, nullable) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCMapView.html *hostMapView;

- `


  ### [tripModel](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCJourneySharingSession#/c:objc(cs)GMTCJourneySharingSession(py)tripModel)


  ` Returns the associated trip session.

  #### Declaration

  Swift

      var tripModel: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCTripModel.html { get }

  Objective-C

      @property (nonatomic, readonly) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCTripModel.html *_Nonnull tripModel;

- `


  ### [-initWithTripModel:](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCJourneySharingSession#/c:objc(cs)GMTCJourneySharingSession(im)initWithTripModel:)


  ` Initializes the session object.

  #### Declaration

  Swift

      init(tripModel: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCTripModel.html)

  Objective-C

      - (nonnull instancetype)initWithTripModel:(nonnull https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCTripModel.html *)tripModel;

  #### Parameters

  |---|---|
  | ` tripModel ` | The target trip request. |

- `


  ### [-init](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCJourneySharingSession#/c:objc(cs)GMTCJourneySharingSession(im)init)


  ` Unavailable

  #### Declaration

  Objective-C

      - (instancetype)init NS_UNAVAILABLE;