The TomTomSDKOfflineFrameworks package provides iOS modules to build "offline" navigation applications requiring no internet connectivity.
Offline functionality for Maps SDK and Navigation SDK for iOS is only available upon request.Contact us to get started.
- Xcode 14.2+
- Swift 5.7+
- Deployment target: iOS 13+
- Because the artifacts for Offline SDK are private, you will need to Contact us to get access.
- Once you have obtained access, go to repositories.tomtom.com and log in with your account. Expand the user menu in the top-right corner, and select
Edit profile
→Generate an Identity Token
. Copy the generated token and use it to specify your credentials in the~/.netrc
file. If the~/.netrc
file doesn’t exist, create one and add the following entries:- Replace the
USERNAME_PLACEHOLDER
with the login username or email you use for repositories.tomtom.com. - Replace the
IDENTITY_TOKEN_PLACEHOLDER
with the generated identity token. - Add a new line to the end of the
~/.netrc
file to avoid parsing errors.
machine repositories.tomtom.com login <USERNAME_PLACEHOLDER> password <IDENTITY_TOKEN_PLACEHOLDER>
- Replace the
- Add a package dependency to your Xcode project:
- Ensure you finished the Getting access steps.
- Select
File
→Add Package Dependencies...
(orFile
→Add Packages...
in Xcode 14). - Enter the next URL in a search field: https://github.com/tomtom-international/tomtom-sdk-spm-offline
- Set
Dependency Rule
toExact Version
.We recommend using the
Exact Version
to have a consistent resolution. - Ensure the
Add to Project
field contains your project. - Click
Add Package
and wait for the Xcode to resolve the package. - You should see the list of
Package Products
. - Select a product you want to add to your project.
- And click
Add Package
.
- Add more products to your target:
- Select your project in the Xcode Project Navigator.
- Select the target to which you want to add dependencies.
- Select the
General
section and scroll down to theFrameworks, Libraries, and Embedded Content
list. - Click
+
button. - Select the products you want to add and click the
Add
button.
- Ensure you finished the Getting access steps.
- Add next line to your package dependencies in the
Package.swift
file:.package(url: "https://github.com/tomtom-international/tomtom-sdk-spm-offline", exact: "0.66.0")
We recommend using the
exact
version to have a consistent resolution. - Add next required module to your target dependencies in the
Package.swift
file, e.g.:.product(name: "TomTomSDKSearchOffline", package: "tomtom-sdk-spm-offline")
- The resulting package might look like this:
let package = Package( name: "MyLibrary", platforms: [.iOS(.v14)], products: [ .library(name: "MyLibrary", targets: ["MyLibrary"]), ], dependencies: [ .package(url: "https://github.com/tomtom-international/tomtom-sdk-spm-offline", exact: "0.66.0") ], targets: [ .target(name: "MyLibrary", dependencies: [ .product(name: "TomTomSDKSearchOffline", package: "tomtom-sdk-spm-offline") /* add more products here */ ]), ] )