Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

document custom API URL & add Info.plist guide #6833

Merged
merged 13 commits into from
Nov 1, 2016
Merged

Conversation

incanus
Copy link
Contributor

@incanus incanus commented Oct 26, 2016

Updated nullability and documented MGLMapboxAPIBaseURL key in Info.plist.

/cc @1ec5 @friedbunny @jakepruitt

@incanus incanus added iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS documentation labels Oct 26, 2016
@incanus incanus added this to the ios-v3.4.0 milestone Oct 26, 2016
@incanus incanus self-assigned this Oct 26, 2016
@mention-bot
Copy link

@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.

@1ec5
Copy link
Contributor

1ec5 commented Oct 26, 2016

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.

@incanus
Copy link
Contributor Author

incanus commented Oct 26, 2016

This documentation won't be visible to the public.

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.

can you document our Info.plist keys in a jazzy guide?

Not sure I follow. Where would this show up?

@1ec5
Copy link
Contributor

1ec5 commented Oct 26, 2016

A guide would be a separate document, listed in the jazzy docs' table of contents. Like the readme, it would be written in Markdown.

@incanus
Copy link
Contributor Author

incanus commented Oct 26, 2016

Ok, got the guides in 0964964. Tried a combined darwin file at first, but macOS doesn't have the opt-out key so had to do separate ones. The section name is tied to the filename, hence the space. This looks pretty good. I don't think we need to mention [Apple's] Core Location keys around location permissions.

screen shot 2016-10-26 at 11 30 15 am

@incanus incanus changed the title document custom API URL document custom API URL & add Info.plist guide Oct 26, 2016
Copy link
Contributor

@1ec5 1ec5 left a 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.
Copy link
Contributor

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.

Copy link
Contributor Author

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.
Copy link
Contributor

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.

Copy link
Contributor Author

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.
Copy link
Contributor

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.

Copy link
Contributor Author

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.
Copy link
Contributor

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.

Copy link
Contributor Author

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" \
Copy link
Contributor

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.

Copy link
Contributor Author

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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space: key in

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@friedbunny
Copy link
Contributor

friedbunny commented Oct 26, 2016

Currently looks like:

screen shot 2016-10-26 at 3 25 26 pm

@1ec5
Copy link
Contributor

1ec5 commented Oct 27, 2016

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.

@incanus
Copy link
Contributor Author

incanus commented Oct 27, 2016 via email

@incanus
Copy link
Contributor Author

incanus commented Nov 1, 2016

Pending tests, this should be all good to go again.

@incanus incanus merged commit dfd4057 into master Nov 1, 2016
@incanus incanus deleted the ios-network-config-docs branch November 1, 2016 05:34
incanus added a commit that referenced this pull request Nov 1, 2016
Also support base URL nullability in order to use default value.
@incanus
Copy link
Contributor Author

incanus commented Nov 1, 2016

Cherry-picked to 3.4.0 release branch as 8ffd1f6.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants