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
If no
hostis passed intoSpeechSynthesizer(accessToken:host:), the fallback hostname should be either api.mapbox.com or api.mapbox.cn depending on the value ofMGLMapboxAPIBaseURLin Info.plist:mapbox-speech-swift/MapboxSpeech/MapboxSpeech.swift
Line 96 in b016385
This would be consistent with how we read the access token out of Info.plist:
mapbox-speech-swift/MapboxSpeech/MapboxSpeech.swift
Line 89 in b016385
This will make it easier for developers to keep their map, directions, and spoken instructions in sync, since
SpeechSynthesizer.sharedwould 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 separateSpeechSynthesizerinstance./ref mapbox/MapboxGeocoder.swift#107
/cc @m-stephen @bsudekum