-
Notifications
You must be signed in to change notification settings - Fork 1.3k
document custom API URL & add Info.plist guide #6833
Conversation
@incanus, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bleege, @1ec5 and @friedbunny to be potential reviewers. |
This documentation won't be visible to the public. While you're at it, can you document our Info.plist keys in a jazzy guide? See realm/jazzy#523. |
Right, that's fine. This is under-the-radar enough that folks can pick it up from the changelog, if at all. The docs are more for us.
Not sure I follow. Where would this show up? |
A guide would be a separate document, listed in the jazzy docs' table of contents. Like the readme, it would be written in Markdown. |
Ok, got the guides in 0964964. Tried a combined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for starting our first jazzy guide! I like the direction this is headed.
|
||
## MGLMapboxAccessToken | ||
|
||
Use this key to set your Mapbox API [access token](https://www.mapbox.com/help/define-access-token/). This key is required for all map use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a good place to consolidate the explanation that’s currently in +[MGLAccessToken setAccessToken:]
and MGLMapView. Actually, since a link back to this document won’t work in Quick Help, duplicating that explanation would be preferable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
## MGLMapboxAPIBaseURL | ||
|
||
Use this key if you need to customize the API base URL used throughout the SDK. If unset, the default Mapbox API is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An example would be nice (even the default value). Otherwise, the developer has no idea whether to include the scheme, a trailing slash, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
## MGLMapboxAccessToken | ||
|
||
Use this key to set your Mapbox API [access token](https://www.mapbox.com/help/define-access-token/). This key is required for all map use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also link to +[MGLAccountManager setAccessToken:]
as an alternative for developers who prefer to set their access token in code, as well as this guide for those who want to keep their access token super private.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
## MGLMapboxAccessToken | ||
|
||
Set the <a href="https://www.mapbox.com/help/define-access-token/">Mapbox access token</a> to be used by all instances of `MGLMapView` in the current application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: use Markdown link syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -38,6 +38,7 @@ jazzy \ | |||
--github-file-prefix https://github.com/mapbox/mapbox-gl-native/tree/${BRANCH} \ | |||
--module-version ${SHORT_VERSION} \ | |||
--readme ${README} \ | |||
--documentation="platform/ios/Info.plist Keys.md" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move to platform/ios/docs/ to live alongside doc-README.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -62,6 +62,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT | |||
* Fixed a crash that occurred when encountering a rate-limit error in response to a network request. ([#6223](https://github.com/mapbox/mapbox-gl-native/pull/6223)) | |||
* Fixed an issue causing an MGLOfflinePack’s progress to continue to update after calling `-suspend`. ([#6186](https://github.com/mapbox/mapbox-gl-native/pull/6186)) | |||
* Fixed an issue preventing cached annotation images from displaying while the device is offline. ([#6358](https://github.com/mapbox/mapbox-gl-native/pull/6358)) | |||
* Added support for an `MGLMapboxAPIBaseURL` key in an app's `Info.plist` in order to customize the base URL used for retrieving map data, styles, and other resources. ([#6709](https://github.com/mapbox/mapbox-gl-native/pull/6709)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space: key in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I'm OK with how this guide is listed at the end of the table of contents, but it might be possible to bring it to the top by specifying it in the custom table of contents in jazzy.yml. |
It should be, but I was also ok with where it is now.
|
Pending tests, this should be all good to go again. |
Also support base URL nullability in order to use default value.
Cherry-picked to 3.4.0 release branch as 8ffd1f6. |
Updated nullability and documented
MGLMapboxAPIBaseURL
key inInfo.plist
./cc @1ec5 @friedbunny @jakepruitt