GMTCServices Class Reference

GMTCServices Class Reference

Overview

Service class for the Google Consumer Ridesharing SDK for iOS.

Static Public Member Functions

(void) + setAccessTokenProvider:providerID:
 Main Rodesharing SDK init method.
(instancetype) + sharedServices
 Provides the shared instance of GMTCServices for the Google Ridesharing SDK for iOS.
(NSString *) + SDKVersion
 Returns the version for this release of the Google Ridesharing SDK for iOS.
(NSString *) + SDKLongVersion
 Returns the long formatted version of the string.
(void) + setAbnormalTerminationReportingEnabled:
 Enables reporting of abnormal SDK terminations such as when the app crashes while the SDK is still running.

Properties

GMTCTripServicetripService
 Return an instance of the GMTCTripService.

Member Function Documentation

+ (void) setAccessTokenProvider: (id< GMTCAuthorization >)  accessTokenProvider
providerID: (NSString *)  providerID 

Main Rodesharing SDK init method.

Should be called before any other method.

Parameters:
accessTokenProviderAn implementation of GMTCAuthorization, which can provide a valid access token.
providerIDAn ID of the Google Cloud Project (e.g. sample-consumer-project).
+ (instancetype) 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.

+ (NSString *) 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.

+ (NSString *) SDKLongVersion

Returns the long formatted version of the string.

It includes the version string and bundle version in format "<SHORT VERSION> (<BUNDLE VERSION>)". For example, "0.4.4 (234.2)".

+ (void) setAbnormalTerminationReportingEnabled: (BOOL)  abnormalTerminationReportingEnabled

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.


Property Documentation

- (GMTCTripService*) tripService [read, assign]

Return an instance of the GMTCTripService.