# GoogleNavigation Framework Reference

# GMSNavigationServices

    @interface GMSNavigationServices : NSObject

Services enabling control of mobile access to the Google Maps Navigation SDK for iOS.
- `


  ### [+areTermsAndConditionsAccepted](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices#/c:objc(cs)GMSNavigationServices(cm)areTermsAndConditionsAccepted)


  ` For versions \>= 5.5.0, indicates whether the terms and conditions
  have been acknowledged by the user.

  For earlier versions, indicates whether the terms and conditions
  have been accepted by the user.

  If false, the services disable access to navigation interfaces.

  #### Declaration

  Swift

      class func areTermsAndConditionsAccepted() -> Bool

  Objective-C

      + (BOOL)areTermsAndConditionsAccepted;

- `


  ### [+showTermsAndConditionsDialogIfNeededWithOptions:callback:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices#/c:objc(cs)GMSNavigationServices(cm)showTermsAndConditionsDialogIfNeededWithOptions:callback:)


  `
  - Shows a modal dialog box if the app user has not yet accepted the Navigation SDK terms and
  - conditions. The callback is sent on the main queue with the user's response. \*
  - If the user has already accepted the terms and conditions, no dialog appears, and the callback
  - contains `termsAccepted` = `YES.
    ` \*
  - - parameter: options The `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationTermsAndConditionsOptions.html` object which modifies the appearance
  - of the terms and conditions dialog. See `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationTermsAndConditionsOptions.html` for more
  - information.
  - - parameter: callback Block sent on the main queue with the user's response.

  #### Declaration

  Swift

      class func showTermsAndConditionsDialogIfNeeded(with options: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationTermsAndConditionsOptions.html, callback: @escaping https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSTermsResponseCallback.html)

  Objective-C

      + (void)
          showTermsAndConditionsDialogIfNeededWithOptions:
              (nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationTermsAndConditionsOptions.html *)options
                                                 callback:
                                                     (nonnull
                                                          https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSTermsResponseCallback.html)
                                                         callback;

- `


  ### [shouldOnlyShowDriverAwarenesssDisclaimer](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices#/c:objc(cs)GMSNavigationServices(cpy)shouldOnlyShowDriverAwarenesssDisclaimer)


  ` Deprecated

  Use the `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationTermsAndConditionsOptions.html` API instead.
  Indicates if `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices.html#/c:objc(cs)GMSNavigationServices(cm)showTermsAndConditionsDialogIfNeededWithCompanyName:callback:` should
  display the driver awareness disclaimer only. The default is `NO` and the disclaimer is
  shown in addition to the default terms and services provided with the Navigation SDK.
  Set to `YES` to indicate that only the driver awareness disclaimer should be shown.

  If the project must show the Terms and Conditions dialog, setting this variable to `YES` has no
  effect. Additionally, the getter method always returns `NO` .

  This property must be set or read from the main thread.

  #### Declaration

  Swift

      class var shouldOnlyShowDriverAwarenesssDisclaimer: Bool { get set }

  Objective-C

      @property (class, nonatomic) BOOL shouldOnlyShowDriverAwarenesssDisclaimer;

- `


  ### [+showTermsAndConditionsDialogIfNeededWithTitle:companyName:UIParams:callback:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices#/c:objc(cs)GMSNavigationServices(cm)showTermsAndConditionsDialogIfNeededWithTitle:companyName:UIParams:callback:)


  ` Deprecated

  Use `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices.html#/c:objc(cs)GMSNavigationServices(cm)showTermsAndConditionsDialogIfNeededWithOptions:callback:` instead.
  Shows a modal dialog box if the app user has not yet accepted the Navigation SDK terms and
  conditions. The callback is sent on the main queue with the user's response.

  If the user has already accepted the terms and conditions, no dialog appears, and the callback
  contains `termsAccepted` = `YES`
  Set `companyName` parameter to your company. The company name appears in the terms and
  conditions text. The text explains to app users that location data may be shared with this
  company to improve operations.

  Call this method from the main thread. Multiple calls without waiting for a response have no
  effect.

  #### Declaration

  Swift

      class func showTermsAndConditionsDialogIfNeeded(withTitle title: String?, companyName: String, uiParams UIParams: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationTermsDialogUIParams.html?, callback: @escaping https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSTermsResponseCallback.html)

  Objective-C

      + (void)
          showTermsAndConditionsDialogIfNeededWithTitle:(nullable NSString *)title
                                            companyName:
                                                (nonnull NSString *)companyName
                                               UIParams:
                                                   (nullable https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationTermsDialogUIParams.html
                                                        *)UIParams
                                               callback:
                                                   (nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSTermsResponseCallback.html)
                                                       callback;

  #### Parameters

  |---|---|
  | ` title ` | Title of the dialog box. If `title` is nil, the dialog uses the default title. Note: For custom titles, the caller of this method needs to localize this parameter. The default title is localized by the services automatically. |
  | ` companyName ` | Name of the company releasing the app and in the agreement with Google to share location data. |
  | ` UIParams ` | Parameters defining the look and feel of the dialog box. If nil, the dialog box uses the default look and feel. |
  | ` callback ` | Block sent on the main queue with the user's response. |

- `


  ### [+showTermsAndConditionsDialogIfNeededWithTitle:companyName:callback:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices#/c:objc(cs)GMSNavigationServices(cm)showTermsAndConditionsDialogIfNeededWithTitle:companyName:callback:)


  ` Deprecated

  Use `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices.html#/c:objc(cs)GMSNavigationServices(cm)showTermsAndConditionsDialogIfNeededWithOptions:callback:` instead.
  Shows the terms and conditions dialog using the default look and feel.

  See `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices.html#/c:objc(cs)GMSNavigationServices(cm)showTermsAndConditionsDialogIfNeededWithTitle:companyName:UIParams:callback:` for details,
  including a description of the parameters @title, `companyName` and `callback`.

  #### Declaration

  Swift

      class func showTermsAndConditionsDialogIfNeeded(withTitle title: String?, companyName: String, callback: @escaping https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSTermsResponseCallback.html)

  Objective-C

      + (void)
          showTermsAndConditionsDialogIfNeededWithTitle:(nullable NSString *)title
                                            companyName:
                                                (nonnull NSString *)companyName
                                               callback:
                                                   (nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSTermsResponseCallback.html)
                                                       callback;

- `


  ### [+showTermsAndConditionsDialogIfNeededWithCompanyName:callback:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices#/c:objc(cs)GMSNavigationServices(cm)showTermsAndConditionsDialogIfNeededWithCompanyName:callback:)


  ` Deprecated

  Use `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices.html#/c:objc(cs)GMSNavigationServices(cm)showTermsAndConditionsDialogIfNeededWithOptions:callback:` instead.
  Shows the terms and conditions dialog using the default title and look and feel.

  See +showTermsAndConditionsDialogIfNeededWithTitle:companyName:UIParams:callback: for details,
  including a description of the parameters `companyName` and `callback`.

  #### Declaration

  Swift

      class func showTermsAndConditionsDialogIfNeeded(withCompanyName companyName: String, callback: @escaping https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSTermsResponseCallback.html)

  Objective-C

      + (void)
          showTermsAndConditionsDialogIfNeededWithCompanyName:
              (nonnull NSString *)companyName
                                                     callback:
                                                         (nonnull
                                                              https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSTermsResponseCallback.html)
                                                             callback;

- `


  ### [+resetTermsAndConditionsAccepted](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices#/c:objc(cs)GMSNavigationServices(cm)resetTermsAndConditionsAccepted)


  `
  - Resets the terms and conditions to the unaccepted state. After calling this method,
  - `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices.html#/c:objc(cs)GMSNavigationServices(cm)areTermsAndConditionsAccepted` will return NO, and
  - `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices.html#/c:objc(cs)GMSNavigationServices(cm)showTermsAndConditionsDialogIfNeededWithOptions:callback:` and
  - `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices.html#/c:objc(cs)GMSNavigationServices(cm)showTermsAndConditionsDialogIfNeededWithCompanyName:callback:` will show the terms and
  - conditions dialog. The `navigationEnabled` property of any existing `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSMapView.html` instances will be
  - reset to NO.

  #### Declaration

  Swift

      class func resetTermsAndConditionsAccepted()

  Objective-C

      + (void)resetTermsAndConditionsAccepted;

- `


  ### [+setAbnormalTerminationReportingEnabled:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices#/c:objc(cs)GMSNavigationServices(cm)setAbnormalTerminationReportingEnabled:)


  ` Enables reporting of abnormal SDK terminations such as 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 services instance is initialized.

  This property must be set from the main thread.

  #### Declaration

  Swift

      class func setAbnormalTerminationReportingEnabled(_ abnormalTerminationReportingEnabled: Bool)

  Objective-C

      + (void)setAbnormalTerminationReportingEnabled:
          (BOOL)abnormalTerminationReportingEnabled;

- `


  ### [+createNavigationSession](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices#/c:objc(cs)GMSNavigationServices(cm)createNavigationSession)


  ` Creates a new navigation session which is not associated with a map view.

  This allocates and returns a new navigation session. Waypoints and options may be set on
  the session, and listeners may be added to it.

  If the terms and conditions have not yet been accepted, this method will return nil.
  That is the only reason nil will be returned from this method.

  You can associate this session with a map after creating it by using the `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSMapView.html` method
  `-enableNavigationWithSession:.` Sessions are heavyweight objects that consume memory, data,
  and battery, so they should be allocated only if a persistent navigation session is a major
  feature of the application. For the same reason, if your app creates a navigation UI after it
  establishes a navigation session, make sure to start the navigation UI with the existing
  navigation session rather than creating a new one.

  The lifetime of the navigation session is governed by normal Objective-C semantics.
  Therefore, the caller of this routine should save a reference to the session.

  #### Declaration

  Swift

      class func createNavigationSession() -> https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationSession.html?

  Objective-C

      + (nullable https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationSession.html *)createNavigationSession;

- `


  ### [+openSourceLicenseInfo](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices#/c:objc(cs)GMSNavigationServices(cm)openSourceLicenseInfo)


  ` Returns the open source software license information for Google Navigation SDK for iOS. This
  information must be available within your application.

  #### Declaration

  Swift

      class func openSourceLicenseInfo() -> String

  Objective-C

      + (nonnull NSString *)openSourceLicenseInfo;

- `


  ### [+navSDKVersion](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationServices#/c:objc(cs)GMSNavigationServices(cm)navSDKVersion)


  ` Returns the version for this release of the Navigation SDK for iOS.

  #### Declaration

  Swift

      class func navSDKVersion() -> String

  Objective-C

      + (nonnull NSString *)navSDKVersion;