-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
If no host is passed into SpeechSynthesizer(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:
| let accessToken = accessToken ?? defaultAccessToken |
This will make it easier for developers to keep their map, directions, and spoken instructions in sync, since SpeechSynthesizer.shared would automatically pick up the API endpoint specified in Info.plist. Developers who need a different value for the speech synthesizer can still override the API base URL when creating a separate SpeechSynthesizer instance.
/ref mapbox/MapboxGeocoder.swift#107
/cc @m-stephen @bsudekum