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

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

Merged
incanus merged 13 commits into
masterfrom
ios-network-config-docs
Nov 1, 2016
Merged

incanus merged 13 commits into
masterfrom
ios-network-config-docs

Conversation

@incanus

@incanus incanus commented Oct 26, 2016

Copy link
Copy Markdown
Contributor

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
Copy Markdown

@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

1ec5 commented Oct 26, 2016

Copy link
Copy Markdown
Contributor

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

incanus commented Oct 26, 2016

Copy link
Copy Markdown
Contributor Author

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

1ec5 commented Oct 26, 2016

Copy link
Copy Markdown
Contributor

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

incanus commented Oct 26, 2016 •

Copy link
Copy Markdown
Contributor Author

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

@1ec5 1ec5 left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread platform/ios/Info.plist Keys.md Outdated

## 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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread platform/ios/Info.plist Keys.md Outdated

## 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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread platform/ios/Info.plist Keys.md Outdated

## 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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread platform/ios/Info.plist Keys.md Outdated

## 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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread platform/ios/scripts/document.sh Outdated
--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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread platform/ios/CHANGELOG.md Outdated
* 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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@friedbunny

friedbunny commented Oct 26, 2016 •

Copy link
Copy Markdown
Contributor

Currently looks like:

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

@1ec5

1ec5 commented Oct 27, 2016

Copy link
Copy Markdown
Contributor

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

incanus commented Oct 27, 2016 via email

Copy link
Copy Markdown
Contributor Author

@incanus

incanus commented Nov 1, 2016

Copy link
Copy Markdown
Contributor Author

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

incanus commented Nov 1, 2016

Copy link
Copy Markdown
Contributor Author

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