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

Storyboards should recognize when access token is set elsewhere #1404

Closed
friedbunny opened this issue May 2, 2015 · 4 comments
Closed

Storyboards should recognize when access token is set elsewhere #1404

friedbunny opened this issue May 2, 2015 · 4 comments
Labels
iOS Mapbox Maps SDK for iOS

Comments

@friedbunny
Copy link
Contributor

When using storyboards to instantiate a map view, it isn't always desirable to set the access token there. We should do the legwork to check if the access token is set elsewhere (perhaps as a global) and present the pretty blue "everything is OK!" screen if it is actually working.

Per chat with @1ec5:

Not sure if designable code can look at environment variables, but it could be made to read a resource file that wouldn't be checked in. Lots of hoops to go through then.

But this isn't really specific to storyboards. Code works the same way; best to use a dedicated public token I suppose.

@friedbunny friedbunny added the iOS Mapbox Maps SDK for iOS label May 2, 2015
@friedbunny
Copy link
Contributor Author

There is also the (edge?) case where developers may not be using Mapbox tiles and thus not require a Mapbox access token.

@1ec5
Copy link
Contributor

1ec5 commented May 13, 2015

See also #1553: from within a build script, it’s easier to add the access token to the Info.plist (using plutil -insert) than to code or a storyboard (where you’d have to do some amount of parsing). But I think Treble demonstrates that the ignored access token file approach makes sense too.

@1ec5
Copy link
Contributor

1ec5 commented May 14, 2015

#1553 (comment) provides a sample Run Script build phase. I think I’d be comfortable putting that script in a help topic on mapbox.com and linking to it from the installation guide, for developers hesitant to make even their public access tokens public.

@friedbunny
Copy link
Contributor Author

Action on this happening in #1613.

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

No branches or pull requests

2 participants