Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read API base URL from Info.plist #79

Open
1ec5 opened this issue Jul 18, 2018 · 0 comments
Open

Read API base URL from Info.plist #79

1ec5 opened this issue Jul 18, 2018 · 0 comments

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jul 18, 2018

If no host is passed into Snapshot(options:accessToken:host:), the fallback hostname should be either api.mapbox.com or api.mapbox.cn depending on the value of MGLMapboxAPIBaseURL in Info.plist:

baseURLComponents.host = host ?? "api.mapbox.com"

This would be consistent with how we read the access token out of Info.plist:

/// The Mapbox access token specified in the main application bundle’s Info.plist.
let defaultAccessToken = Bundle.main.object(forInfoDictionaryKey: "MGLMapboxAccessToken") as? String

/ref mapbox/MapboxGeocoder.swift#107
/cc @m-stephen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant