mapbox / mapbox/MapboxGeocoder.swift
Read API base URL from Info.plist
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 133
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
If no host is passed into Geocoder(accessToken:host:), the fallback hostname should be either api.mapbox.com or api.mapbox.cn depending on the value of MGLMapboxAPIBaseURL in Info.plist:
This would be consistent with how we read the access token out of Info.plist:
This will make it easier for developers to keep their map and geocoder usage in sync, since Geocoder.shared would automatically pick up the API endpoint specified in Info.plist. Developers who need a different value for the geocoder can still override the API base URL when creating a separate Geocoder instance.
/cc @pdgoodman
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in MapboxGeocoder/MBGeocoder.swift around lines 147-154, comparing the existing access-token lookup in Info.plist with the fallback host logic. The change is done when an omitted host selects api.mapbox.com or api.mapbox.cn from MGLMapboxAPIBaseURL while an explicitly supplied host remains an override.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100