Project set up

VERSION 0.2.1455
PUBLIC PREVIEW

This guide describes how to set up your iOS project to use the SDK.

To use Maps SDK in your application you need to obtain a TomTom API key by following these instructions. Remember to keep your API key secure.

  1. Install Xcode if you don’t already have it.

  2. Create a new project or open an existing one. The application deployment target has to be set to at least 13.0.

  3. Install Cocoapods on your computer.

  4. Install the cocoapods-art tool on your computer.

  5. Add a reference to the cocoapods-art repository:

    pod repo-art add tomtom-sdk-cocoapods "https://repositories.tomtom.com/artifactory/api/pods/cocoapods"
  6. Create a Podfile in the project folder. The pod init command in the project folder can generate a basic podfile.

  7. At the top of the Podfile add the source of the SDK Cocoapods.

    1plugin 'cocoapods-art', :sources => [
    2 'tomtom-sdk-cocoapods'
    3]
  8. Add the module dependencies that you need in your application.

    1SDK_VERSION = '{version}'
    2
    3target 'YourAppTarget' do
    4 use_frameworks!
    5 pod 'TomTomSDKMapsDisplay', SDK_VERSION
    6 pod 'TomTomSDKOnlineRouting', SDK_VERSION
    7 pod 'TomTomSDKRouting', SDK_VERSION
    8 (...)
    9end
  9. Install the dependencies by executing the following command in the project folder.

    pod install
  10. To update the SDK version, run the command

    pod repo-art update tomtom-sdk-cocoapods

Next steps

Now that you’ve set up your project, here are some suggestions for what to do with it: