Docs / Setup / iOS / TomTom

TomTom setup

How to drive TomTom Orbis Maps through MapConductor. The iOS provider matches the Android one feature for feature: marker, polyline, polygon, circle, ground image, raster layer and info bubble.

PACKAGE
ios-for-tomtom
API KEY
Required
MIN iOS
16.0
VIEW
TomTomMapView
Same provider, other platformsAndroidReact

Before you start

Xcode 15 or newer
A TomTom Orbis Maps API key from the Developer Portal
A deployment target of iOS 16.0 or later
STEP 01

Get an API key

Issue an Orbis Maps API key in the TomTom Developer Portal.

STEP 02

Add TomTom's distribution source

The TomTom Orbis Maps Display SDK is distributed as binary xcframeworks from TomTom's Artifactory. The MapConductor package references them as binary targets, so add TomTom's source to your app's Podfile.

PodfileRuby
source 'https://api.tomtom.com/maps-sdk-ios/cocoapods'
STEP 03

Add it with Swift Package Manager

Use File > Add Package Dependencies in Xcode and paste the package URL.

Package URLSwift Package Manager
https://github.com/MapConductor/ios-for-tomtom
Package.swiftSwift
dependencies: [
    .package(url: "https://github.com/MapConductor/ios-sdk-core", from: "1.1.4"),
    .package(url: "https://github.com/MapConductor/ios-for-tomtom", from: "1.0.0"),
],
targets: [
    .target(
        name: "YourApp",
        dependencies: [
            .product(name: "MapConductorCore", package: "ios-sdk-core"),
            .product(name: "MapConductorForTomTom", package: "ios-for-tomtom"),
        ]
    ),
]
STEP 04

Hand over the API key

Pass it per view, or put it in Info.plist.

ContentView.swiftSwift
// Per view
TomTomMapView(state: state, apiKey: "YOUR_TOMTOM_API_KEY")
Info.plistXML
<key>TomTomAPIKey</key>
<string>YOUR_TOMTOM_API_KEY</string>

VERIFY

What you should see

The setup is complete when the map and its marker render — and a draggable marker can be dragged.

ContentView.swiftSwiftUI
import SwiftUI
import MapConductorCore
import MapConductorForTomTom

struct ContentView: View {
    @StateObject var state = TomTomMapViewState(
        mapDesignType: TomTomMapDesign.Standard,
        cameraPosition: MapCameraPosition(
            position: GeoPoint(latitude: 52.3676, longitude: 4.9041),
            zoom: 11
        )
    )

    var body: some View {
        TomTomMapView(state: state) {
            Marker(state: MarkerState(
                position: GeoPoint(latitude: 52.3676, longitude: 4.9041),
                icon: DefaultMarkerIcon(label: "Amsterdam"),
                draggable: true
            ))
        }
    }
}

Map designs

TomTomMapDesign maps onto the Orbis Maps standard styles.

TomTomMapDesign
Notes
Standard
The standard browsing style
Driving
Tuned for driving
Satellite
Satellite imagery

Troubleshooting

The map stays blank

  • Check either the view's apiKey or Info.plist's TomTomAPIKey holds a value.
  • Check the deployment target is iOS 16.0 or later.

The xcframeworks cannot be found

  • The TomTom SDK is a binary distribution — confirm you added TomTom's source to the Podfile.

The build fails

  • Clean the build folder (Cmd+Shift+K).
  • Delete ~/Library/Developer/Xcode/DerivedData and rebuild.
  • Refresh the Swift Package Manager dependencies, and avoid mixing in CocoaPods.

Next

TomTom has no native marker drag, so MapConductor implements it with its own gesture recogniser on the MapView. Zoom is converted to the Google-equivalent scale using the camera latitude.