mapbox / mapbox/MapboxStatic.swift

Read API base URL from Info.plist

Open
#79 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Swift
Stars
192
Forks
31
PR merge metrics
No merged PRs in 30d

Description

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:

https://github.com/mapbox/MapboxStatic.swift/blob/32a32ef03b0094e98dcd07ad673125db4e0eb62c/MapboxStatic/Snapshot.swift#L114

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

https://github.com/mapbox/MapboxStatic.swift/blob/32a32ef03b0094e98dcd07ad673125db4e0eb62c/MapboxStatic/Snapshot.swift#L14-L15

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in MapboxStatic/Snapshot.swift at the fallback hostname around line 114, and compare the Info.plist access-token handling around lines 14-15. Review the referenced MapboxGeocoder.swift line 107 for the related pattern; the work is done when an absent host selects api.mapbox.com or api.mapbox.cn according to MGLMapboxAPIBaseURL.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.