Info.plist Keys

The Mapbox Maps SDK for iOS supports custom Info.plist keys in your application in order to configure various settings.

MGLMapboxAccessToken

Set the Mapbox access token to be used by all instances of MGLMapView in the current application.

Mapbox-hosted vector tiles and styles require an API access token, which you can obtain from the Mapbox account page. Access tokens associate requests to Mapbox’s vector tile and style APIs with your Mapbox account. They also deter other developers from using your styles without your permission.

As an alternative, you can use +[MGLAccountManager setAccessToken:] to set a token in code. See our guide for some tips on keeping access tokens in open source code private.

MGLMapboxAPIBaseURL

Use this key if you need to customize the API base URL used throughout the SDK. If unset, the default Mapbox API is used.

The default value is https://api.mapbox.com.

MGLMapboxMetricsEnabledSettingShownInApp

If you have implemented custom opt-out of Mapbox Telemetry within the user interface of your app, use this key to disable the built-in check for opt-out support. See this guide for more details.

MGLIdeographicFontFamilyName

The name of the font family to use for client-side text rendering of CJK ideographs. Set this to the name of a font family which will be available at run time, e.g. PingFang TC (iOS 9+), Heiti TC (iOS 8+), another appropriate built-in font, or a font provided by your application. Note that if a non-existent font is specified, iOS will fall back to using Helvetica which is likely not to include support for the glyphs needed to render maps in your application.