# GMTCServices

    @interface GMTCServices : NSObject

Service class for the Google Consumer Ridesharing SDK for iOS.
- `


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


  ` Return an instance of the `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCTripService.html`.

  #### Declaration

  Swift

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

  Objective-C

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

- `


  ### [+setAccessTokenProvider:providerID:](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCServices#/c:objc(cs)GMTCServices(cm)setAccessTokenProvider:providerID:)


  ` Main Rodesharing SDK init method. Should be called before any other method.

  #### Declaration

  Swift

      class func setAccessTokenProvider(_ accessTokenProvider: any https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Protocols/GMTCAuthorization.html, providerID: String)

  Objective-C

      + (void)setAccessTokenProvider:
                  (nonnull id<https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Protocols/GMTCAuthorization.html>)accessTokenProvider
                          providerID:(nonnull NSString *)providerID;

  #### Parameters

  |---|---|
  | ` accessTokenProvider ` | An implementation of `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Protocols/GMTCAuthorization.html`, which can provide a valid access token. |
  | ` providerID ` | An ID of the Google Cloud Project (e.g. sample-consumer-project). |

- `


  ### [+sharedServices](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCServices#/c:objc(cs)GMTCServices(cm)sharedServices)


  ` Provides the shared instance of `GMTCServices` for the Google Ridesharing SDK for iOS.
  Ridesharing classes will hold this instance to provide their connection to Google.

  This method will throw an exception if `+setAccessTokenProvider:` has not been called.

  #### Declaration

  Swift

      class func shared() -> Self

  Objective-C

      + (nonnull instancetype)sharedServices;

- `


  ### [+SDKVersion](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCServices#/c:objc(cs)GMTCServices(cm)SDKVersion)


  ` Returns the version for this release of the Google Ridesharing SDK for iOS. For example, "0.4.4".
  The version number is in the SDK's resource bundle.

  #### Declaration

  Swift

      class func sdkVersion() -> String

  Objective-C

      + (nonnull NSString *)SDKVersion;

- `


  ### [+SDKLongVersion](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCServices#/c:objc(cs)GMTCServices(cm)SDKLongVersion)


  ` Returns the long formatted version of the string. It includes the version string and bundle
  version in format " ()". For example, "0.4.4 (234.2)".

  #### Declaration

  Swift

      class func sdkLongVersion() -> String

  Objective-C

      + (nonnull NSString *)SDKLongVersion;

- `


  ### [+setAbnormalTerminationReportingEnabled:](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCServices#/c:objc(cs)GMTCServices(cm)setAbnormalTerminationReportingEnabled:)


  ` Enables reporting of abnormal SDK terminations such as when the app crashes while the SDK is
  still running. This allows Google to improve SDK stability when applicable. The default is YES
  and value must be updated before the `sharedServices` is called.

  This property must be set from the main thread.

  #### Declaration

  Swift

      class func setAbnormalTerminationReportingEnabled(_ abnormalTerminationReportingEnabled: Bool)

  Objective-C

      + (void)setAbnormalTerminationReportingEnabled:
          (BOOL)abnormalTerminationReportingEnabled;