Project set up
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.
Install Xcode if you don’t already have it.
Create a new project or open an existing one. The application deployment target has to be set to at least 13.0.
Install Cocoapods on your computer.
Install the cocoapods-art tool on your computer.
Add a reference to the cocoapods-art repository:
pod repo-art add tomtom-sdk-cocoapods "https://repositories.tomtom.com/artifactory/api/pods/cocoapods"Create a
Podfile
in the project folder. Thepod init
command in the project folder can generate a basic podfile.At the top of the Podfile add the source of the SDK Cocoapods.
1plugin 'cocoapods-art', :sources => [2 'tomtom-sdk-cocoapods'3]Add the module dependencies that you need in your application.
1SDK_VERSION = '{version}'23target 'YourAppTarget' do4 use_frameworks!5 pod 'TomTomSDKMapsDisplay', SDK_VERSION6 pod 'TomTomSDKOnlineRouting', SDK_VERSION7 pod 'TomTomSDKRouting', SDK_VERSION8 (...)9endInstall the dependencies by executing the following command in the project folder.
pod installTo 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: