Telemetry configuration

VERSION 0.65.0
PUBLIC PREVIEW

This guide uses the Navigation SDK for iOS, which is only available upon request. Contact us to get started.

The Navigation SDK can send telemetry data to TomTom. This helps us improve the SDK user experience. The Telemetry module allows the configuration of data collection.

In this guide, you will learn how to configure the Telemetry module and adjust the user consent level.

Project setup

Then add the following dependencies, depending on your preferred package manager:

Swift Package Manager

. To incorporate the Telemetry package into your project, follow the steps described in tomtom-sdk-spm-telemetry.

  1. Click File > Add Packages… / Add Package Dependencies… in XCode.
  2. In the Enter Package URL textbox, enter the URL for the package mentioned previously.
  3. Set the Dependency Rule to Exact Version.
  4. Ensure that you’ve selected the appropriate project where you want to add this dependency and click Add Package.
  5. Once the package is successfully resolved and added to your project, you can use this package by importing Telemetry modules into your Swift files:
import TomTomSDKTelemetry
import TomTomSDKTelemetryConfigProvider
CocoaPods

. Add the TomTomSDKTelemetry and TomTomSDKTelemetryConfigProvider modules to your project’s Podfile:

+

1TOMTOM_SDK_VERSION = '0.65.0'
2
3target 'YourAppTarget' do
4 use_frameworks!
5 pod 'TomTomSDKTelemetry', TOMTOM_SDK_VERSION
6 pod 'TomTomSDKTelemetryConfigProvider', TOMTOM_SDK_VERSION
7end
  1. Install the dependencies by executing the following commands in the project directory:
    pod repo-art update tomtom-sdk-cocoapods
    pod install --repo-update
  2. Add the following imports to your project:
    import TomTomSDKTelemetry
    import TomTomSDKTelemetryConfigProvider

Basic configuration

You can use the Telemetry object to configure what telemetry data the SDK sends. Initialize the Telemetry object before you start the TomTomNavigation. To initialize the Telemetry object, you must provide an instance of DefaultTelemetryConfigProvider, set with the API key.

let configProvider = try DefaultTelemetryConfigProvider(apiKey: "YOUR_TOMTOM_API_KEY")
try Telemetry.initialize(configProvider: configProvider)

Telemetry initialization can only be done once. Every subsequent attempt to initialize the Telemetry is ignored.

You can enable or disable data collection for an end user by setting the Telemetry.userConsent property.

Consent.none results in the SDK sending no telemetry data. This is the default value.

Consent.anonymized results in the SDK sending only anonymous telemetry data.

Consent.pseudonymized causes the SDK to send the telemetry data with no personal or billing information. The data allows TomTom to identify the user. For example, given a user, TomTom can tell what routes they took. However, TomTom can’t link personal or billing data with the user.

Consent.personalized results in the SDK sending the telemetry data, including any available personal or billing information.

Telemetry.userConsent = .personalized

Unless agreed differently in the contract, we ask our customers to only enable an end user to use the Traffic services if the user simultaneously consents to the telemetry data collection.

Next steps

Since you have learned how to configure Telemetry, here are recommendations for the next steps:

Starting navigation

Learn how to start turn-by-turn navigation.

Built-in location providers

Read what built-in location providers TomTom Navigation SDK for iOS offers.

Create your own provider

Learn how to create a custom location provider.