Quickstart

VERSION 0.2.1455
PUBLIC PREVIEW

The Location module provides an interface for obtaining and working with location updates. It provides implementations for getting an actual user location with and without Apple Services, as well as one for simulating locations.

To use the Location module, you need to configure the project and add the dependencies.

Project set up

To use the Location SDK, you will need to do the following:

  1. Set up the project - Project set up guide.
  2. Once the project is set up, import the following frameworks:
    import TomTomSDKLocation

Existing location engines

The Location module provides the basic LocationEngine protocol. All location engines have to adopt this protocol. The Location module contains the following location engine implementations:

  1. DefaultCLLocationEngine - relies on the Apple Core Location services.
  2. SimulatedLocationEngine - simulates updates for testing purposes and previewing routes.

Learn more about existing location engines in the Built-in location engines.

Custom location engines

Within the TomTom SDKs, developers are not limited to the provided location engines and can use their own services to record locations, or develop their own custom simulated location updates. Read more about creating your own custom location engine in the Create your own engine guide.

Location validator

LocationValidator defines the interface for checking if the location is fixed or not. The GPS fix status indicates the quality of the signal, or the accuracy and reliability of the location being reported. The Location module provides the DefaultLocationValidator or developers can create the custom one.

Location permissions

If the application is going to use user location data, you have to request the correct permissions. In particular, the user must grant location permission before the location engine can be used. Complete instructions to request location permissions on iOS can be found at Requesting authorization for location services. DefaultCLLocationEngine has the location authorization request from the box.