Skip to content

mapbox/mapbox-navigation-ios-examples

Repository files navigation

Mapbox Navigation SDK Examples

CircleCI

A collection of examples showing off the Mapbox Navigation SDK.

Installation

Installation with CocoaPods

  1. git clone https://github.com/mapbox/mapbox-navigation-ios-examples.git
  2. cd mapbox-navigation-ios-examples
  3. Go to your Mapbox account dashboard and create an access token that has the 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_MAPBOX_TOKEN 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.
  4. Run pod repo update && pod install and open the resulting Navigation-Examples.xcworkspace.
  5. Sign up or log in to your Mapbox account and grab a Mapbox access token.
  6. Enter your Mapbox access token into the value of the 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.
  7. Building and run the Navigation-Examples scheme.

Add an example:

  1. Add the example to /Examples.
  2. Add the example name to the Constants.swift.
  3. Run the app.

Additional resources

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:

About

A collection of examples showing off the Mapbox Navigation SDK.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages