A collection of examples showing off the Mapbox Navigation SDK.
Installation with CocoaPods
git clone https://github.com/mapbox/mapbox-navigation-ios-examples.git
cd mapbox-navigation-ios-examples
DOWNLOADS:READ
scope. PLEASE NOTE: This is not the same as your production Mapbox API token. Make sure to keep it private and do not insert it into any Info.plist file. Create a file named .netrc
in your home directory if it doesn’t already exist, then add the following lines to the end of the file:
machine api.mapbox.com
login mapbox
password YOUR_SECRET_MAPBOX_TOKEN
where _YOUR_SECRET_MAPBOXTOKEN is your Mapbox API token with the DOWNLOADS:READ
scope. The login should always be mapbox
. It should not be your personal username used to create the secret token.
pod repo update && pod install
and open the resulting Navigation-Examples.xcworkspace.MBXAccessToken
key within the Info.plist file. Alternatively, if you plan to use this project as the basis for any open source application, read this guide to learn how to best protect your access tokens./Examples
.Constants.swift
.While we are not able to answer support questions in this repository, below are some helpful resources if you're just getting started with the Mapbox Navigation SDK for iOS: